src/rules/correctness/setting.bend checks
raw source on the hub · import bolt@1.48.0.0/src/rules/correctness/setting.bend as Setting
rule setting: a setting in a bolt.bend (a def whose body holds a string)
whose name is neither a rule's slug nor a group, as the code table
(src/codes.bend) lists them. Grading only looks names up, so such a setting
sets nothing and fails open: def wrp() -> String: "off" leaves wrap at
its group's level, and a retired name (def quantify(), def shadow())
does nothing at all. Rename it to the rule or group it meant, or delete it.
A bolt.bend is read, never linted (laws/ScopeConfigIsNeverLinted.bend), so this is not a per-file
rule: the planner (src/lint/plan.bend) runs it once over each bolt.bend
that grades a directory of the run, the first of that directory's
candidates it read (laws/ConfigNearestFileGrades.bend), and reports each unknown setting at that
bolt.bend's path and the line of its def, in file order, after the
per-file findings and before the project rules'. It is graded by the
bolt.bend it reports on, like any rule (def setting() -> String: "off"
turns it off there). A noqa comment in a bolt.bend silences nothing, since
the file is never read for marks. The editor does not run it (laws/LspPublishesOnDocumentEvents.bend).
3 imports
import Base import ../../finding.bend as F import ../../config.bend as Config
Definitions
def found source · line 22 · raw
@ss:List<&2, 0x6bb0891959f774bd94f33b9c30f054d3/src/config.Setting> -> @+path:String -> List<&2, 0x6bb0891959f774bd94f33b9c30f054d3/src/finding.Finding>
each setting as a finding at the bolt.bend's path and its def's line
def check source · line 32 · raw
@+path:String -> @text:String -> List<&2, 0x6bb0891959f774bd94f33b9c30f054d3/src/finding.Finding>
the findings on a bolt.bend's text: one for each setting whose name is no rule or group, in file order