def on.rules.role

bolt@1.27.0.0 · src/rules.bend:69

import bolt@1.27.0.0/src/rules.bend as Rules
import Base
import bolt@1.27.0.0/src/finding.bend as F
import bolt@1.27.0.0/src/src.bend as Src
import bolt@1.27.0.0/src/role.bend as Role
import bolt@1.27.0.0/src/rules/style/doc.bend as Doc
import bolt@1.27.0.0/src/rules/suspicious/unused.bend as Unused
import bolt@1.27.0.0/src/rules/correctness/hole.bend as Hole
import bolt@1.27.0.0/src/rules/style/space.bend as Space
import bolt@1.27.0.0/src/rules/style/wrap.bend as Wrap
import bolt@1.27.0.0/src/rules/style/param.bend as Param
import bolt@1.27.0.0/src/rules/style/transcong.bend as Transcong
import bolt@1.27.0.0/src/rules/correctness/pick.bend as Pick
import bolt@1.27.0.0/src/rules/pedantic/strict.bend as Strict
import bolt@1.27.0.0/src/rules/suspicious/eager.bend as Eager
import bolt@1.27.0.0/src/rules/pedantic/tail.bend as Tail
import bolt@1.27.0.0/src/rules/suspicious/concat.bend as Concat
import bolt@1.27.0.0/src/rules/pedantic/index.bend as Index
import bolt@1.27.0.0/src/rules/pedantic/rewalk.bend as Rewalk
import bolt@1.27.0.0/src/rules/suspicious/thunk.bend as Thunk
import bolt@1.27.0.0/src/rules/suspicious/fromrev.bend as Fromrev
import bolt@1.27.0.0/src/rules/suspicious/prefix.bend as Prefix
import bolt@1.27.0.0/src/rules/suspicious/empty.bend as Empty
import bolt@1.27.0.0/src/rules/correctness/put.bend as Put
import bolt@1.27.0.0/src/rules/correctness/escape.bend as Escape
import bolt@1.27.0.0/src/rules/perf/strings.bend as Strings
import bolt@1.27.0.0/src/rules/perf/chars.bend as Chars
import bolt@1.27.0.0/src/rules/correctness/twice.bend as Twice
import bolt@1.27.0.0/src/rules/correctness/arms.bend as Arms
import bolt@1.27.0.0/src/rules/pedantic/foreign.bend as Foreign
import bolt@1.27.0.0/src/rules/pedantic/fuel.bend as Fuel
import bolt@1.27.0.0/src/rules/laws/closed.bend as Closed

69# every per-file rule on a file, told its role (src/role.bend): the rules a
70# law or proof file changes (doc, hole, param, fromrev, prefix, empty, closed)
71# read the role, never the path, and the cost rules check nothing in a law
72# or proof file
73def on.rules.role(+rr: Role.Role, +ss: Src.Src) -> List<&2, F.Finding>:
74  List.concat(&2, F.Finding, [
75    Doc.check.role(rr, ss),
76    Unused.check(ss),
77    Hole.check.role(rr, ss),
78    Space.check(ss),
79    Wrap.check(ss),
80    Param.check.role(rr, ss),
81    Role.skip(rr, _u => Pick.check(ss)),
82    Role.skip(rr, _u => Pick.search(ss)),
83    Role.skip(rr, _u => Strict.check(ss)),
84    Role.skip(rr, _u => Eager.check(ss)),
85    Role.skip(rr, _u => Tail.check(ss)),
86    Role.skip(rr, _u => Concat.check(ss)),
87    Role.skip(rr, _u => Concat.cont(ss)),
88    Role.skip(rr, _u => Index.check(ss)),
89    Role.skip(rr, _u => Rewalk.check(ss)),
90    Role.skip(rr, _u => Thunk.check(ss)),
91    Fromrev.check.role(rr, ss),
92    Prefix.check.role(rr, ss),
93    Empty.check.role(rr, ss),
94    Put.check(ss),
95    Escape.check(ss),
96    Strings.check(ss),
97    Chars.check(ss),
98    Twice.check(ss),
99    Arms.check(ss),
100    Foreign.check(ss),
101    Fuel.check(ss),
102    Closed.check.role(rr, ss),
103    Transcong.check(ss)])

Uses (35)

Used by (1)