Expand description
lint: everything wrong with the shape of the game’s code, in one
answer, each finding with its file, its line and what to do (ADR-0005
§1):
check-keys’ findings: a key named in the game’s code or text (crate::check_keys,codes::HARD_CODED_KEY);check-text’s: screen text written as literals, when there are more than the project allows, and a data name read by a screen (crate::check_text,codes::SCREEN_TEXT);- the rules crate’s fence (ADR-0032 §4):
cargo clippyon the packageshuyi.ron’srulesnames, read for the lints itsclippy.tomland itslib.rsset, a hash map, a float, a clock, file I/O or outside luck (FENCE_LINTS,codes::RULES_FENCE); - its layers:
cargo treeof that package, as the template’stests/layers.rsreads it, each crate the rules never depend on (NEVER,codes::RULES_DEPENDENCY) with thecargo tree -ithat shows the way in.
The two checks run in this process; clippy and cargo tree run as
child processes from the project’s root, through a Cargo, so the
tests can give any output. What isn’t checked (a part shuyi.ron
lacks, a cargo that fails) is in the answer’s limits. It passes when
nothing is found.
Structs§
- Finding
- One thing wrong, with where.
- Lint
Input - What
lintchecks: everything (nothing to choose yet). - Lint
Output - What
lintfound. - Ran
- What cargo printed and whether it succeeded.
- This
Machine - The machine’s cargo: the one running this program if cargo started it
(
CARGO), elsecargoon thePATH.
Enums§
- Lint
Check - Which check found a finding.
Constants§
- FENCE_
LINTS - The clippy lints of the rules crate’s fence.
- NEVER
- The crates the rules never depend on, even through another crate, as
the template’s grid stage’s
crates/rules/tests/layers.rslists them (a test keeps the two the same). A trailing*is a prefix.
Traits§
- Cargo
- How
lintruns cargo.
Functions§
- clippy_
findings - The fence’s findings in clippy’s JSON output,
stdout(cargo’s--message-format=json), files shown fromroot: each message of a lint ofFENCE_LINTS, once, its reason after it. Any other lint is left out. - lint
lintonproject, running cargo withcargo.- reported
- A finding of
checkfrom a line a check reports (file:line: what, orfile: what), withcode; one that couldn’t read a file hascodes::FILE. - text
- What
lintfound, for people. - tree_
findings - The layers’ findings in
cargo tree -p package --prefix none --format {p}’s output,stdout: each crate ofNEVERin it, once, in the package’sCargo.toml(fromroot, read off the tree’s first line), with thecargo tree -ithat shows the way in. - usage
lint’s usage, withcommandas the tool’s name.