lint: choose the rules in the manifest #2
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
A project chooses its lint rules in
project.trb. Todaytorb linttakes--rule <id>and--skip <id>on the command line only; a project has no place to say which rules apply to it.Specification
torb lintNo design record names the setting yet; its name and shape are an owner decision (see the
owner decisioncomment on this issue). The acceptance criteria below are written for the recommended option, alint { rules "..."; skip "..." }section, and are adjusted to the decided shape.Acceptance criteria
std/projecthas the type behind the setting and a field onProject; aproject.trbwithlint { rules ..., skip ... }type checks.compiler/src/project/manifest.trb) reads literal rule ids; a computedlintblock is read from the evaluated manifest. A workspace member without a block takes its root's.torb lintapplies the manifest's choice (rulespicks,skipleaves out, norulesmeans every rule);--ruleand--skipon the command line override the manifest's lists.torb check, andtorb lintrefuses to run on it.compiler/tests/for: manifest choice applied, command line overriding it, unknown id, workspace inheritance.docs/tooling/torb-lint.md(synopsis and the "What is not decided" entry removed),docs/tooling/project-trb.md(settings table),docs/design/PROJECT.md(section 12 row),docs/standard-library/project.md;skills/regenerated.Seed
No seed refresh expected: no syntax change, no new native, no new driver flag, no std name the compiler looks up by string (the static reader matches section names in the syntax tree, as it does for
tasksandprofile).Size and dependencies
One PR, one or two Conventional Commits (
feat(project): ...for the setting and its reader,feat(lint): ...for honouring it). Tier A gates; tier B is not needed (nocompiler/src/ir,backendorruntimechange). Blocked only by the owner decision on the setting's shape.[loop:torbscript] intake: in scope (author orion, label loop). Implements the open
torb lintitem of ROADMAP. Possible owner question to settle in refine: the name and shape of theproject.trbsetting if torb-lint.md/project-trb.md do not fix it. No collision with CONCEPT "Open Questions". Release freeze for 0.1.0 (2026-10-06) holds new PRs, next: refine (buffer already >= 2 ready, so queued)git:andarchive:sources #27[loop:torbscript] claim refine by session:loop-torbscript-20261007 until 2026-10-07T17:31:00Z
[loop:torbscript] owner decision: the name and shape of the
project.trbsetting that chooses lint rulesWhat.
docs/tooling/torb-lint.md("What is not decided") saysdocs/design/PROJECT.mdhas no setting for lint rules, and grep finds none inCONCEPT.mdeither. So the setting is a library design choice (a new field ofstd/project'sProject) that no design record settles. This issue implements it; the choice is yours, not the loop's.Constraints that hold for every option.
self-name,question-field), so they are strings, never field names:lint { self-name = false }cannot be written.--rule <id>(pick, default: every rule) and--skip <id>(leave out), both repeatable; the manifest setting has the same two verbs, and the command line overrides it.Options.
lint { }section with two variadic lines, likedependencies { runtime "..." }andworkspace { members "..." }: NewLinttype instd/projectwithrulesandskip, avar lint: Lint = Lint()field onProjectnext totestandtasks. Mirrors--rule/--skipone to one.lintRules "..."andlintSkip "...". Smaller type surface, butProjectcollects tool settings in sections (tasks,test,profile), so this breaks the pattern.lint { skip "..." }), norules. Simplest; a project that wants an allow-list cannot say so, although--rulecan.Sub-decisions (each with the recommended answer).
PROJECT.mdsection 12 (no file layout depends on it), so it may be computed, astasksandprofileare; the static reader reads literal ids, and alintblock that is computed makes the toolchain evaluate the file. Recommended: computed allowed.--ruleon the command line replaces the manifest'srules, and a--skipreplaces itsskip(per list, so--skip xdoes not silently drop a manifestrules). Alternative: any flag replaces the whole manifest choice. Recommended: per list.lintblock takes its root's, as aprofileblock does. Recommended: yes.torb checkat the id's line (as`fast` is no profile), andtorb lintrefuses to run on it. Same for a rule in bothrulesandskip? Recommended: allowed,skipwins, as on the command line today.Recommendation. Option A with sub-decisions 1 to 4 as recommended. No seed change is expected (no syntax change, native, driver flag or looked-up std name;
manifest.trbreads sections by text from the syntax tree), and the slice is one PR:std/projecttype, static reader plus evaluated manifest,torb linthonouring it, docs fortorb-lint.md,project-trb.md,design/PROJECT.mdsection 12 and the generatedskills/.Once you answer, the issue gets
readywith the decided shape. Until then it is waiting.[loop:torbscript] refine: requirements written (goal, acceptance criteria, specification points, seed: none expected, size: one PR) and the issue body rewritten; the setting's name and shape (
lint { rules, skip }section vs flat lines vs skip-only, plus precedence and workspace rules) is not settled in any design record, so the owner decision is filed in #2 (comment) andreadyis not set, next: waiting (owner decision)[loop:torbscript] owner decision answered (Torben, 2026-10-07): no configurable linting. TorbScript looks the same and is formatted the same everywhere; the format is part of the language. So there is no
project.trblint setting, and--skipgoes as well. Follow-up: #157. Closing as not planned.git:andarchive:sources #27