Lint File: problems in the current file !488

merged merged by cmc on 2026-11-26 08:33 UTC · krz/orgstar:m5-lint into main

Discussion

cmc 2026-11-26 08:19 UTC

Lint File (app.lint) checks the open Org file, as org-lint does. Reports only. Ref #152; checking every folder comes later as a second command.

  • OrgCore/Lint: OrgLint.lint(text, tree:, path:, environment:) takes one file and a LintEnvironment (file system, ID lookup, attachment and crypt settings), so a later all-folders command can call it per file from the index with one environment.
  • Checkers with org-lint's names, trust and messages: invalid-fuzzy-link, invalid-custom-id-link, invalid-id-link, invalid-coderef-link, link-to-local-file, file-application, duplicate-custom-id, duplicate-name, duplicate-target, duplicate-footnote-definition, incomplete-drawer, invalid-block, misplaced-planning-info, obsolete-properties-drawer, misplaced-heading, indented-diary-sexp, invalid-keyword-syntax, orphaned-affiliated-keywords, obsolete-affiliated-keywords, missing-language-in-src-block, missing-backend-in-export-block, deprecated-export-blocks, deprecated-category-setup, non-existent-setupfile-parameter, priority, spurious-colons, quote-section, special-property-in-properties-drawer, invalid-effort-property, invalid-id-property, timestamp-syntax, clock-syntax, planning-inactive, mismatched-planning-repeaters, undefined-footnote-reference, unreferenced-footnote-definition.
  • orgstar's own: duplicate-id (through the index), unknown-todo-keyword, missing-attachment-folder, orphaned-attachment-folder, invalid-file-search.
  • Left out (Babel header tables, export back-ends, citations, list numbering, LaTeX and link-bracket details): listed in 15-alongside-emacs.org.
  • Encrypted entry bodies aren't linted; .org.gpg buffers are linted as decrypted in memory.
  • Mac: panel under the editor (File ▸ Lint File, palette); relints after a pause in typing; choosing a row moves the caret. iOS: Lint File under File in Commands opens a list.
  • OrgAttach.directory split so one DocumentModel serves many headings; Links.parse(bracket:) skips its regexes when there are no abbreviations or newlines.

Tests: LintTests (each checker, positive and negative), LintOracleTests (org-lint on a corpus and on Conformance/*.org, same lines per shared checker except invalid-id-link, whose org-lint result depends on org-id-locations; skipped without Emacs), FileLintTests, lint timing in GateTests. swift test, both Xcode builds and ORGSTAR_GATES=1 swift test -c release --filter GateTests/gates pass. Lint on the 1 MB gate files: 0.15–0.30 s (release, load average about 17).

Manual: 02-the-editor.org (Lint File), 03-keys.org, 14-ios.org, 15-alongside-emacs.org. Strings in the catalog for all languages.

Not checked on a device: the iOS list (built for the simulator only).

Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form