Skip to content

Lint

Facet checks the whole workspace as you type and reports problems in VS Code and in the facet lint command. Each result has a severity, a lint id and a one-sentence message. Lint ids are fixed: tools and tests can rely on them.

pilot/stations.md:6:45: error unknown-id !dcks does not exist
pilot/stations.md:8:3: warning late ends 2027-05-24, after its due date 2027-05-14
1 error, 1 warning
Id Raised when
duplicate-id an id is used twice in the workspace
unknown-id an !id points at nothing
dependency-cycle after:: dependencies form a cycle
bad-date a date cannot be parsed
bad-duration a duration cannot be parsed
unknown-requirement a req~ in covers:: or Needs: is not defined
status-not-in-board a leaf task’s status:: is not a board column
bad-after-target after:: points at a node that cannot have dates
unquoted-id-in-yaml a frontmatter !id entry is not quoted
unknown-include an include: path is missing, ignored or outside
bad-frontmatter the YAML frontmatter cannot be read
bad-value another property value cannot be read
parse-failed the file could not be parsed at all
  • duplicate-id is reported on every use of the id after the first.
  • unknown-id covers after::, include: entries and !id in titles and descriptions. See References and ids.
  • dependency-cycle includes cycles through a parent: a child that comes after:: its own roll-up parent. See Dependencies.
  • bad-date covers start, end, due, last and away; bad-duration covers duration; bad-value covers every other known key (id, type, after, repeat, priority, owner, covers, needs, progress). See Known keys.
  • bad-after-target: the target is a note, requirement, file, folder or repeating task. See Dependencies.
  • unknown-include: the path does not exist, is excluded by .facetignore, or leads outside the workspace. See include:.
  • status-not-in-board only applies to leaf tasks on a custom board. A parent task’s status:: is ignored. See the Board view.
  • bad-frontmatter is also raised for frontmatter that is not a mapping of keys to values.
  • parse-failed is a Facet bug: please report it with the file that caused it.
Id Raised when
late the computed end passes due::
over-allocated a person’s leaf tasks overlap
uncovered-requirement no task covers a requirement
unscheduled a task has no start and no ancestor with one
children-outside-parent a child leaves its parent’s own dates
owner-away a leaf task overlaps its owner’s away:: period
end-before-start a node’s start is past its fixed end::
  • late: see Deadlines. Done, cancelled and repeating tasks are never late.
  • over-allocated is reported once per task involved, in that task’s file. owner-away is reported once per task and owner. See People.
  • uncovered-requirement: see Coverage.
  • unscheduled is not raised for a task that already has an error that prevents scheduling, or that waits on an unscheduled task. See Unanchored nodes.
  • children-outside-parent: a child starts before or ends after its parent’s own start or end, see Parent boxes. Cancelled children are not checked.
  • end-before-start: the start may be fixed or come from after::; the node then has zero length at its start.

facet lint <dir> prints every result of a workspace, sorted by file and position, as path:line:column: severity id message, then a count.

Exit code Meaning
0 no errors (warnings allowed)
1 at least one error
2 the command was misused, or the folder cannot be read

--today YYYY-MM-DD computes the date-dependent rules (late, and every rule that resolves today) as of another day. facet schedule prints the computed dates behind those rules, see Checking the schedule.

A lint header states a result that a file is expected to give, with the reason. Each header is one HTML comment on the first lines of the file, after the frontmatter if there is one:

<!-- lint: warning late (the pilot ends after the deadline) -->
<!-- lint: warning owner-away (@jun is away that week) -->
# Station roll-out
  • The form is <!-- lint: error|warning <lint-id> (reason) -->, one comment per expected result.
  • Any file may carry them, for example a plan that is late on purpose.
  • They are documentation and expectations, not suppressions: facet lint still reports the results.
  • Facet’s own example files are tested against them: a file without headers is expected to give no results, and a <!-- lint: comment that is malformed, names an unknown id or comes after the header block is a test failure.