Troubleshooting
Solutions to common problems when using FSH Lint.
Installation Issues
Section titled “Installation Issues”Cargo Install Fails
Section titled “Cargo Install Fails”Problem: cargo install fsh-lint
fails
Solutions:
- Update Rust:
rustup update stable
- Clear cargo cache:
rm -rf ~/.cargo/registrycargo install fsh-lint
- Build with verbose output:
cargo install fsh-lint -v
Binary Not Found
Section titled “Binary Not Found”Problem: fsh-lint: command not found
Solution: Add Cargo bin to PATH:
export PATH="$HOME/.cargo/bin:$PATH"
Add to .bashrc
or .zshrc
for persistence.
Configuration Issues
Section titled “Configuration Issues”Config File Not Found
Section titled “Config File Not Found”Problem: FSH Lint can’t find configuration
Solution: Create config in project root:
fsh-lint init
Invalid Configuration
Section titled “Invalid Configuration”Problem: Configuration file is invalid
Solution: Validate against schema:
fsh-lint check --config fsh-lint.json
Linting Issues
Section titled “Linting Issues”Too Many Diagnostics
Section titled “Too Many Diagnostics”Problem: Overwhelming number of errors
Solutions:
- Start with errors only:
fsh-lint lint --severity error **/*.fsh
- Fix automatically:
fsh-lint lint --fix **/*.fsh
- Temporarily disable rules:
{ "linter": { "rules": { "style": "off" } }}
False Positives
Section titled “False Positives”Problem: Rule incorrectly reports issue
Solutions:
- Disable inline:
// fsh-lint-disable-next-line rule-nameProfile: MyProfile
- Adjust rule severity:
{ "linter": { "rules": { "style/naming-convention": "off" } }}
Performance Issues
Section titled “Performance Issues”Slow Linting
Section titled “Slow Linting”Problem: Linting takes too long
Solutions:
- Exclude large directories:
{ "files": { "exclude": ["**/node_modules/**", "**/build/**"] }}
- Limit file scope:
fsh-lint lint input/fsh/ --ignore-pattern "**/*.generated.fsh"
High Memory Usage
Section titled “High Memory Usage”Problem: FSH Lint uses too much memory
Solution: Process files in batches:
find . -name "*.fsh" -print0 | xargs -0 -n 10 fsh-lint lint
CI/CD Issues
Section titled “CI/CD Issues”Build Timeout
Section titled “Build Timeout”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/
Inconsistent Results
Section titled “Inconsistent Results”Problem: Different results in CI vs local
Solution: Pin FSH Lint version:
cargo install fsh-lint --version 0.1.0
Output Issues
Section titled “Output Issues”No Color in CI
Section titled “No Color in CI”Problem: CI output lacks color
Solution: Force color output:
fsh-lint --color always lint **/*.fsh
Garbled Output
Section titled “Garbled Output”Problem: Output has encoding issues
Solution: Set UTF-8 encoding:
export LANG=en_US.UTF-8fsh-lint lint **/*.fsh
Getting Help
Section titled “Getting Help”If you’re still stuck:
- Check GitHub Issues
- Search Discussions
- Open a new issue with:
- FSH Lint version (
fsh-lint --version
) - OS and version
- Minimal reproduction example
- Full error output
- FSH Lint version (
Common Error Messages
Section titled “Common Error Messages””Failed to parse FSH file”
Section titled “”Failed to parse FSH file””Cause: Invalid FSH syntax
Solution: Check FSH syntax against FSH spec
”Circular dependency detected”
Section titled “”Circular dependency detected””Cause: Profile inherits from itself
Solution: Review parent relationships
”Unknown rule”
Section titled “”Unknown rule””Cause: Referenced rule doesn’t exist
Solution: Run fsh-lint rules
to see available rules