Repository navigation
Expand file tree
/
Copy pathstaticcheck.conf
More file actions
38 lines (36 loc) · 1.74 KB
/
Copy pathstaticcheck.conf
File metadata and controls
38 lines (36 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# staticcheck configuration
#
# Run: staticcheck ./...
#
# Every check staticcheck ships is enabled except the ones listed below, each
# with the reason it is off. A check is disabled here only when it is wrong for
# this codebase, never because a finding was inconvenient to fix.
checks = ["all", "-ST1005", "-ST1000", "-ST1003", "-ST1020", "-ST1021", "-ST1022"]
# -ST1005 "error strings should not be capitalized"
#
# The Go style guide's rule exists because error strings get embedded in
# larger messages, so a capital letter appears mid-sentence. It explicitly
# exempts proper nouns, and staticcheck cannot tell a proper noun from a
# sentence start.
#
# 24 of this repository's 25 ST1005 findings were proper nouns: "Docker is
# not available" (16 sites), "Firejail is not available" (3), plus Gemini,
# Ouroboros, Go, and Namespace. Lowercasing them produces "docker is not
# available", which is worse for an operator reading a log and wrong about
# the product's name. The one genuine finding — an error that began "No" and
# ended in a full stop — was fixed rather than suppressed
# (internal/tools/research/context7.go).
#
# If this is re-enabled later, exempt the proper nouns explicitly rather than
# lowercasing them.
#
# -ST1000 "at least one file in a package should have a package comment"
# -ST1003 naming conventions (initialisms)
# -ST1020 comment on exported function
# -ST1021 comment on exported type
# -ST1022 comment on exported variable
#
# Documentation-completeness checks. This repository documents deliberately
# and heavily where it matters; a blanket requirement produces restatement
# comments ("// Foo does foo") that add tokens and no information. Left off
# so the review signal stays about behaviour.