src/rules/style/noqa.bend checks
raw source on the hub · import 0xd96f2ab40f5df4925c42e96d0ba857ff/src/rules/style/noqa.bend as Noqa
rule noqa: a noqa comment (src/noqa.bend) that silences nothing, as ruff's RUF100. A bare one names no code, so it silences nothing; a code it names silences nothing when no graded finding of the file, on the mark's line, has that code, and a code that is no rule's never does. One finding for a bare mark, and one for each such code, at the comment.
It reads the graded findings of the whole run, so it is no per-file rule:
the planner runs it after every other rule and after the filter, and
what it reports no noqa comment silences. A project rule's code
(coverage, unsafe, trace) is judged only when the run is the whole
tree (whole): over files named, and in the editor, those rules see only
part of the laws, so their silence proves nothing.
5 imports
import Base import ../../lazy/lazy.bend as Lazy import ../../finding.bend as F import ../../codes.bend as Codes import ../../noqa.bend as Noqa
Definitions
def project source · line 20 · raw
@+code:String -> Bool
a project rule's code
def judged source · line 26 · raw
@+whole:Bool -> @+code:String -> Bool
a code this run can judge: any, over the whole tree; a per-file rule's (or no rule's) otherwise
def known.in source · line 30 · raw
@rows:List<&2, 0xd96f2ab40f5df4925c42e96d0ba857ff/src/codes.Entry> -> @+code:String -> Bool
some row of the table has the code
def known source · line 38 · raw
@+code:String -> Bool
the code is a rule's
def used source · line 42 · raw
@gs:List<&2, 0xd96f2ab40f5df4925c42e96d0ba857ff/src/finding.Graded> -> @+path:String -> @+line:U32 -> @+code:String -> Bool
a graded finding at the path, on the line, has the code
def say.bare source · line 53 · raw
String
what a bare mark is told
def say source · line 57 · raw
@+code:String -> String
what an unused code is told: a rule's, or no rule's
def check.codes source · line 62 · raw
@cs:List<&2, String> -> @+whole:Bool -> @+path:String -> @+line:U32 -> @+col:U32 -> @+len:U32 -> @+gs:List<&2, 0xd96f2ab40f5df4925c42e96d0ba857ff/src/finding.Graded> -> List<&2, 0xd96f2ab40f5df4925c42e96d0ba857ff/src/finding.Finding>
one finding for each code judged here that silences nothing on its line
def check.mark source · line 82 · raw
@mk:0xd96f2ab40f5df4925c42e96d0ba857ff/src/noqa.Mark -> @+whole:Bool -> @+path:String -> @+gs:List<&2, 0xd96f2ab40f5df4925c42e96d0ba857ff/src/finding.Graded> -> List<&2, 0xd96f2ab40f5df4925c42e96d0ba857ff/src/finding.Finding>
a mark's findings: one when it is bare, else one per code that silences nothing
def check source · line 90 · raw
@mks:List<&2, 0xd96f2ab40f5df4925c42e96d0ba857ff/src/noqa.Mark> -> @+whole:Bool -> @+path:String -> @+gs:List<&2, 0xd96f2ab40f5df4925c42e96d0ba857ff/src/finding.Graded> -> List<&2, 0xd96f2ab40f5df4925c42e96d0ba857ff/src/finding.Finding>
every mark of the file at the path, against the run's graded findings