.qlty/qlty.toml

86 lines · 1943 bytes

 1config_version = "0"
 2
 3# Qlty's generated defaults exclude **/config/** and **/templates/**, which
 4# would skip internal/config.
 5exclude_patterns = [
 6  "**/testdata/**",
 7  "**/vendor/**",
 8  ".gitbay/wiki/**",
 9]
10
11test_patterns = [
12  "**/*_test.go",
13  "e2e/**",
14]
15
16[smells]
17mode = "comment"
18
19[[source]]
20name = "default"
21default = true
22
23[[plugin]]
24name = "golangci-lint"
25version = "2.15.0"
26drivers = ["lint"]
27
28[[plugin]]
29name = "gofmt"
30
31[[plugin]]
32name = "radarlint-go"
33
34[[plugin]]
35name = "osv-scanner"
36
37[[plugin]]
38name = "trufflehog"
39
40[[plugin]]
41name = "shellcheck"
42
43[[plugin]]
44name = "ruff"
45drivers = ["lint"]
46
47# Repeated literals are expected in table-driven and end-to-end tests.
48[[triage]]
49match.plugins = ["radarlint-go"]
50match.rules = ["radarlint-go:go:S1192"]
51match.file_patterns = ["**/*_test.go", "e2e/**"]
52set.ignored = true
53
54# Unchecked errors in tests are setup and teardown calls.
55[[triage]]
56match.plugins = ["golangci-lint"]
57match.rules = ["golangci-lint:errcheck"]
58match.file_patterns = ["**/*_test.go", "e2e/**"]
59set.ignored = true
60
61# x/crypto/openpgp is deprecated with no fixed version. gitbay imports
62# github.com/ProtonMail/go-crypto/openpgp, not that package.
63[[triage]]
64match.plugins = ["osv-scanner"]
65match.rules = ["osv-scanner:GO-2026-5932"]
66set.ignored = true
67
68
69# Early returns are guard clauses, which keep the happy path unindented.
70[smells.return_statements]
71enabled = false
72
73# Function and file complexity are left to review rather than counted.
74[smells.function_complexity]
75enabled = false
76
77[smells.file_complexity]
78enabled = false
79
80# Six or seven parameters is ordinary for an unexported Go helper.
81[smells.function_parameters]
82threshold = 8
83
84# The store's hand-written queries each scan their rows in the same loop.
85[language.go.smells.duplication]
86filter_patterns = ["(import_declaration _)", "(for_statement (call_expression function: (selector_expression field: (field_identifier) @_f)) (#eq? @_f \"Next\"))"]