Skip to content

Troubleshooting

Solutions to common problems when using FSH Lint.

Problem: cargo install fsh-lint fails

Solutions:

  1. Update Rust:
Terminal window
rustup update stable
  1. Clear cargo cache:
Terminal window
rm -rf ~/.cargo/registry
cargo install fsh-lint
  1. Build with verbose output:
Terminal window
cargo install fsh-lint -v

Problem: fsh-lint: command not found

Solution: Add Cargo bin to PATH:

Terminal window
export PATH="$HOME/.cargo/bin:$PATH"

Add to .bashrc or .zshrc for persistence.

Problem: FSH Lint can’t find configuration

Solution: Create config in project root:

Terminal window
fsh-lint init

Problem: Configuration file is invalid

Solution: Validate against schema:

Terminal window
fsh-lint check --config fsh-lint.json

Problem: Overwhelming number of errors

Solutions:

  1. Start with errors only:
Terminal window
fsh-lint lint --severity error **/*.fsh
  1. Fix automatically:
Terminal window
fsh-lint lint --fix **/*.fsh
  1. Temporarily disable rules:
{
"linter": {
"rules": {
"style": "off"
}
}
}

Problem: Rule incorrectly reports issue

Solutions:

  1. Disable inline:
// fsh-lint-disable-next-line rule-name
Profile: MyProfile
  1. Adjust rule severity:
{
"linter": {
"rules": {
"style/naming-convention": "off"
}
}
}

Problem: Linting takes too long

Solutions:

  1. Exclude large directories:
{
"files": {
"exclude": ["**/node_modules/**", "**/build/**"]
}
}
  1. Limit file scope:
Terminal window
fsh-lint lint input/fsh/ --ignore-pattern "**/*.generated.fsh"

Problem: FSH Lint uses too much memory

Solution: Process files in batches:

Terminal window
find . -name "*.fsh" -print0 | xargs -0 -n 10 fsh-lint lint

Problem: CI builds timeout during installation

Solution: Use cached binaries:

- name: Download FSH Lint
run: |
curl -L https://github.com/octofhir/fsh-lint-rs/releases/latest/download/fsh-lint-linux.tar.gz | tar xz
sudo mv fsh-lint /usr/local/bin/

Problem: Different results in CI vs local

Solution: Pin FSH Lint version:

Terminal window
cargo install fsh-lint --version 0.1.0

Problem: CI output lacks color

Solution: Force color output:

Terminal window
fsh-lint --color always lint **/*.fsh

Problem: Output has encoding issues

Solution: Set UTF-8 encoding:

Terminal window
export LANG=en_US.UTF-8
fsh-lint lint **/*.fsh

If you’re still stuck:

  1. Check GitHub Issues
  2. Search Discussions
  3. Open a new issue with:
    • FSH Lint version (fsh-lint --version)
    • OS and version
    • Minimal reproduction example
    • Full error output

Cause: Invalid FSH syntax

Solution: Check FSH syntax against FSH spec

Cause: Profile inherits from itself

Solution: Review parent relationships

Cause: Referenced rule doesn’t exist

Solution: Run fsh-lint rules to see available rules