Skip to content

Commit a059ad7

Browse files
authored
Soften linter (#264)
Remove some aggressive linters: `godoc`, `goconst`, `misspel`, `nestif`, and `prealloc. Also remove `stylecheck` since it is subsumed by `revive`, and the later is more configurable. Allow tests and build stages to continue even if linter fails. Signed-off-by: Hamza El-Saawy <[email protected]>
1 parent 376b201 commit a059ad7

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ jobs:
6060
test:
6161
name: Run Tests
6262
needs:
63-
- lint
6463
- go-generate
6564
runs-on: ${{ matrix.os }}
6665
strategy:

.golangci.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,8 @@ linters:
88
- containedctx # struct contains a context
99
- dupl # duplicate code
1010
- errname # erorrs are named correctly
11-
- goconst # strings that should be constants
12-
- godot # comments end in a period
13-
- misspell
1411
- nolintlint # "//nolint" directives are properly explained
1512
- revive # golint replacement
16-
- stylecheck # golint replacement, less configurable than revive
1713
- unconvert # unnecessary conversions
1814
- wastedassign
1915

@@ -23,9 +19,7 @@ linters:
2319
- exhaustive # check exhaustiveness of enum switch statements
2420
- gofmt # files are gofmt'ed
2521
- gosec # security
26-
- nestif # deeply nested ifs
2722
- nilerr # returns nil even with non-nil error
28-
- prealloc # slices that can be pre-allocated
2923
- structcheck # unused struct fields
3024
- unparam # unused function params
3125

@@ -56,6 +50,8 @@ issues:
5650

5751

5852
linters-settings:
53+
exhaustive:
54+
default-signifies-exhaustive: true
5955
govet:
6056
enable-all: true
6157
disable:
@@ -138,7 +134,3 @@ linters-settings:
138134
- VPCI
139135
- WCOW
140136
- WIM
141-
stylecheck:
142-
checks:
143-
- "all"
144-
- "-ST1003" # use revive's var naming

0 commit comments

Comments
 (0)