]> git.giacomolli.uk - onehouse/blob - .golangci.yml
Apply M31 commands through the shared ledger
[onehouse] / .golangci.yml
1 version: "2"
2
3 linters:
4 default: standard
5 enable:
6 - errname
7 - errorlint
8 - gocritic
9 - godot
10 - makezero
11 - misspell
12 - nlreturn
13 - predeclared
14 - revive
15 - testifylint
16 - unconvert
17 - wrapcheck
18 - wsl_v5
19 settings:
20 errcheck:
21 # go-code: Do not discard an error with the blank identifier.
22 check-type-assertions: true
23 check-blank: true
24 errorlint:
25 errorf: true
26 asserts: true
27 comparison: true
28 godot:
29 scope: declarations
30 capital: true
31 govet:
32 enable-all: true
33 disable:
34 - fieldalignment
35 misspell:
36 locale: US
37 wsl_v5:
38 # go-code: Keep an operation with its immediate error check.
39 enable:
40 - err
41 - after-block
42 - after-decl
43 - after-defer
44 - after-expr
45 - after-go
46 # go-code: Keep a short declaration with its immediate use.
47 allow-first-in-block: true
48 allow-whole-block: true
49 cuddle-max-statements: 2
50 disable:
51 # go-code: Keep a short declaration with its immediate assignment use.
52 - assign
53 # go-code: Keep a short declaration, its operation, and its error check
54 # together.
55 - if
56 # go-code: Keep a declared cleanup with its immediate defer.
57 - defer
58 # go-code: Keep a short declaration with its immediate append use.
59 - append
60 # go-code: Keep a short declaration with its immediate worker setup.
61 - go
62 nlreturn:
63 # go-code: Keep a short declaration with its immediate use.
64 block-size: 2
65 wrapcheck:
66 # go-code: Return ctx.Err() directly.
67 extra-ignore-sigs:
68 - "(context.Context).Err() error"
69 exclusions:
70 rules:
71 # docs: Do not write a package comment.
72 - linters: [revive]
73 text: "package-comments"
74
75 formatters:
76 enable:
77 - gofumpt
78 - gci
79 settings:
80 gofumpt:
81 module-path: onehouse
82 gci:
83 # go-code: Group imports as standard library, external, project.
84 sections:
85 - standard
86 - default
87 - prefix(onehouse)
88 custom-order: true
89
90 issues:
91 max-issues-per-linter: 0
92 max-same-issues: 0