Repository navigation
Linter Options
Two blocks govern lint-style diagnostics in the editor:
| Block | Purpose |
|---|---|
linting |
Run CFLint on save and publish its findings |
knownIssues |
Publish findings recorded in files (a baseline, TODOs, generated reports) |
CFLint diagnostics are off by default and enabled per workspace.
{
"linting": { "enabled": true, "minSeverity": "WARNING" }
}| Property | Type | Default | Description |
|---|---|---|---|
enabled |
boolean | false |
Run CFLint on save and publish its findings as diagnostics (source cflint, code = the rule id) |
minSeverity |
string | (unset: everything) | The least severe CFLint level still reported: FATAL, CRITICAL, ERROR, WARNING, CAUTION, INFO, COSMETIC. Anything below it is dropped. An unrecognised name is ignored with a log warning |
A child config setting only minSeverity does not switch linting off.
CFLint's seven levels fold onto LSP severities. None maps to Hint or Information, because editors hide those by default.
| CFLint level | LSP severity |
|---|---|
FATAL, CRITICAL, ERROR
|
Error |
WARNING, CAUTION
|
Warning |
INFO, COSMETIC
|
Warning |
| Anything else | Warning, never filtered by minSeverity
|
Advisory rules (OUTPUT_ATTR, IMPLICIT_SCOPE, ARG_VAR_MIXED) therefore arrive as loudly as real ones.
"minSeverity": "WARNING" filters on CFLint's own scale, so it can still drop INFO after the fold.
.cflintrc files and @CFLintIgnore comments are CFLint's own and apply exactly as when CFLint runs
directly. clif parses every .cflintrc CFLint would read first, and reports a broken one instead of
silently linting with default rules.
| Variable | Effect |
|---|---|
CLIF_CFLINT |
The CFLint binary to run, ahead of PATH and the embedded copy. An error if it names no executable |
CLIF_CFLINT_DIR |
Where clif unpacks (or downloads) CFLint, as <dir>/<version>/, instead of the user cache. An error, not a fallback, if it cannot be written |
Use these on machines that won't run programs from the user's cache or temp folder (AppLocker/WDAC default
rules, a noexec mount). Use absolute paths: the editor's server does not start in your shell's directory.
knownIssues lists files of documented findings (known issues, TODOs, a baseline of unresolved calls, a
project-wide CFLint run). The server publishes each entry as a diagnostic, so it appears in the Problems
panel beside everything else.
{
"knownIssues": {
"scope": "open",
"severity": "warning",
"files": [
"docs/todo.txt",
{ "file": ".clif-cflint.txt", "severity": "warning", "scope": "workspace" }
]
}
}| Property | Type | Default | Description |
|---|---|---|---|
scope |
string | open |
open: publish a file's entries only while that source file is open. workspace: publish every entry at startup |
severity |
string | warning |
error, warning, information or hint. Warning is the least severe level every editor's Problems panel lists (Zed lists only errors and warnings; VS Code omits hints) |
files |
array | [] |
Each a path relative to the .clif.json, or a file object |
| Property | Type | Default | Description |
|---|---|---|---|
file |
string | — | The file, relative to the config |
scope |
string | inherit |
As the block's; omitted or "inherit" takes the block's |
severity |
string | inherit |
As the block's; an entry's [severity CODE] tag overrides it |
source |
string |
known issue (cflint for a lint report) |
The diagnostics' label |
generate |
string | — |
unresolved or lint (legacy: cflint): the file is a report the server writes |
The default generated reports, .clif-unresolved.txt and .clif-cflint.txt beside the .clif.json, are
included without being listed whenever they exist. Each file is watched; editing one republishes its
entries.
One finding per line; blank lines and # comments are ignored.
path:line[:col]: message
packages/shop/service.cfc:120: svc.getOrder (method 'getOrder' not found in packages.shop.persist)
webroot/index.cfm:14:7: [warning CFQUERYPARAM_REQ] <cfquery> should use <cfqueryparam/>
webroot/index.cfm:30: [TODO] move this to the service
| Part | Meaning |
|---|---|
path |
Relative to the directory holding the file. Never absolute (absolute paths are ignored); ../ is allowed |
line, col
|
1-based; col optional |
[CODE] |
Optional leading tag: becomes the diagnostic code (untagged entries get known-issue) |
[severity CODE] |
Optional: also overrides the file's severity |
An entry in the unresolved format is underlined at the method it calls, and is found again within 25 lines when an edit has moved it.
generate |
Written by | Default file |
|---|---|---|
unresolved |
clif.exportUnresolved, or clif unresolved --write <project>
|
.clif-unresolved.txt |
lint |
clif.exportLint (alias clif.exportCFLint), or clif lint --write <project>
|
.clif-cflint.txt |
Both are also offered as code actions on any CFML file: "Export unresolved calls report for the workspace" and "Export lint report for the workspace".
| Behaviour | Detail |
|---|---|
| Several files of one kind | The report is split by directory; each file receives findings under its own directory (deepest wins) |
| Deterministic | The header carries no date, so regenerating an unchanged project changes nothing |
| Scope of a lint report | Only what was linted; the config's own directory stands for the workspacePaths folders beneath it |
| Safety | A report whose directory holds more than was linted is not rewritten |
| Live CFLint | Once a file is linted on save, its report entries are hidden, so an issue is never listed twice |
linting.enabled off |
The export still works, and honours linting.minSeverity
|
CFLint on save, the workspace parse scan, structure diagnostics and known issues publish through one store
that keeps each source's diagnostics per file and always publishes a file with all of them. Closing a file
clears its CFLint and parse diagnostics and its open-scope known issues, and keeps its workspace-scope
ones.