Skip to content

Quick Start

Get up and running with FSH Lint in just a few minutes.

  • Rust 1.80 or later (if building from source)
  • OR use pre-built binaries
Terminal window
cargo install maki

Verify the installation:

Terminal window
maki --version

Create a default configuration file in your FSH project:

Terminal window
cd your-fsh-project
maki init

This creates maki.json with recommended settings:

{
"$schema": "https://octofhir.github.io/maki/schema/v1.json",
"root": true,
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}

Lint all FSH files in the current directory:

Terminal window
maki lint **/*.fsh

Or lint specific files:

Terminal window
maki lint input/fsh/profiles.fsh

FSH Lint will show you any issues found:

error[correctness/duplicate-definition]: Duplicate profile definition
> 15 │ Profile: PatientProfile
│ ^^^^^^^^^^^^^^ Profile 'PatientProfile' is already defined
16 │ * name 1..1 MS
i First defined at line 8

Many issues can be fixed automatically:

Terminal window
maki lint --fix **/*.fsh

FSH Lint will apply safe fixes and report what was changed.

Edit maki.json to customize rule behavior:

{
"linter": {
"rules": {
"recommended": true,
"style": {
"naming-convention": "error" // Upgrade to error
},
"documentation": {
"title-required": "off" // Disable this rule
}
}
}
}
Terminal window
# Lint with automatic fixes
maki lint --fix **/*.fsh
# Lint and show only errors
maki lint --severity error **/*.fsh
# List all available rules
maki rules
# Get detailed information about a specific rule
maki rules --detailed style/naming-convention
# Format FSH files
maki format **/*.fsh
# Format with automatic fixes
maki format --fix **/*.fsh
  • Run maki --help for command-line help
  • Run maki <command> --help for command-specific help
  • Check the Troubleshooting Guide for common issues