Lint rules
octofhir-sof ships 11 FHIR-level lint rules (FH01–FH11). Each has a dedicated
page with what it flags, an example that triggers it, and how to fix or silence
it. They are reported by octofhir-sof validate (structural rules) and
octofhir-sof lint (schema-driven and shareable rules). Each finding links to
its rule page via its help_url.
The rules cite the SQL on FHIR v2 specification where relevant.
Selector rules (need lint --package)
Section titled “Selector rules (need lint --package)”| Code | Severity | Description |
|---|---|---|
| FH01 | error | Unknown FHIR element (with a did-you-mean suggestion) |
| FH02 | warning | Choice element not narrowed with ofType() |
| FH03 | warning | Complex element selected into a scalar column |
| FH04 | warning | Array-valued element into a scalar column |
| FH05 | warning | Reference into a scalar without getReferenceKey() |
Structural rules (run by validate and lint)
Section titled “Structural rules (run by validate and lint)”| Code | Severity | Description |
|---|---|---|
| FH06 | error | Invalid SQL name (column / constant / view name) |
| FH07 | error | More than one of forEach / forEachOrNull / repeat per select |
| FH08 | error | Duplicate output column name |
| FH09 | error | unionAll branches with mismatched shape |
| FH10 | error | Missing resource, or a view that produces no columns |
Portability rule (opt-in with lint --shareable)
Section titled “Portability rule (opt-in with lint --shareable)”| Code | Severity | Description |
|---|---|---|
| FH11 | error / warning | FHIRPath outside the ShareableViewDefinition required subset |
See the linting guide for how to run them.