Skip to content

Commit ca8dfa6

Browse files
authored
Set goconst to ignore test files (#95)
Path exclusions only filter where goconst issues are reported, not which files contribute to the occurrence count, so a string used once in production code and twice in tests still gets flagged. The `ignore-tests` setting makes goconst skip test files entirely.
1 parent 04dadd3 commit ca8dfa6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

.golangci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ version: "2"
33
formatters:
44
enable:
55
- gofmt
6+
7+
linters:
8+
settings:
9+
goconst:
10+
ignore-tests: true

0 commit comments

Comments
 (0)