CLI Commands
Complete reference for all FSH Lint commands.
fsh-lint lint
Section titled “fsh-lint lint”Lint FSH files and report diagnostics.
fsh-lint lint [OPTIONS] <FILES>...
Options
Section titled “Options”--fix
- Automatically fix issues when possible--severity <LEVEL>
- Only show diagnostics at or above this level--format <FORMAT>
- Output format:human
,json
,sarif
,github
--config <PATH>
- Path to configuration file--no-config
- Don’t load configuration files--max-diagnostics <N>
- Limit number of diagnostics shown
Examples
Section titled “Examples”# Lint all FSH filesfsh-lint lint **/*.fsh
# Lint with automatic fixesfsh-lint lint --fix input/fsh/*.fsh
# Show only errorsfsh-lint lint --severity error **/*.fsh
# Output JSON formatfsh-lint lint --format json **/*.fsh > diagnostics.json
fsh-lint format
Section titled “fsh-lint format”Format FSH files.
fsh-lint format [OPTIONS] <FILES>...
Options
Section titled “Options”--check
- Check if files are formatted (don’t modify)--diff
- Show formatting differences--config <PATH>
- Path to configuration file
Examples
Section titled “Examples”# Format all FSH filesfsh-lint format **/*.fsh
# Check formatting without modifyingfsh-lint format --check **/*.fsh
fsh-lint init
Section titled “fsh-lint init”Initialize configuration file.
fsh-lint init [OPTIONS]
Options
Section titled “Options”--full
- Generate full example configuration--output <PATH>
- Output path (default:fsh-lint.json
)
Examples
Section titled “Examples”# Create default configfsh-lint init
# Create full examplefsh-lint init --full
fsh-lint rules
Section titled “fsh-lint rules”List available rules.
fsh-lint rules [OPTIONS]
Options
Section titled “Options”--detailed
- Show detailed information--category <CATEGORY>
- Filter by category--search <QUERY>
- Search rules
Examples
Section titled “Examples”# List all rulesfsh-lint rules
# Show detailed info for a categoryfsh-lint rules --detailed --category style
# Search for specific rulesfsh-lint rules --search naming
fsh-lint check
Section titled “fsh-lint check”Check configuration validity.
fsh-lint check [OPTIONS]
Options
Section titled “Options”--config <PATH>
- Path to configuration file
Examples
Section titled “Examples”# Check default configfsh-lint check
# Check specific configfsh-lint check --config custom-config.json
Global Options
Section titled “Global Options”Available for all commands:
-h, --help
- Print help information-V, --version
- Print version information-v, --verbose
- Enable verbose output--color <WHEN>
- Colorize output:auto
,always
,never
Exit Codes
Section titled “Exit Codes”See Exit Codes for details.