mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-09-06 00:57:19 -04:00
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 <hamzaelsaawy@microsoft.com>
This commit is contained in:
@@ -60,7 +60,6 @@ jobs:
|
|||||||
test:
|
test:
|
||||||
name: Run Tests
|
name: Run Tests
|
||||||
needs:
|
needs:
|
||||||
- lint
|
|
||||||
- go-generate
|
- go-generate
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
+2
-10
@@ -8,12 +8,8 @@ linters:
|
|||||||
- containedctx # struct contains a context
|
- containedctx # struct contains a context
|
||||||
- dupl # duplicate code
|
- dupl # duplicate code
|
||||||
- errname # erorrs are named correctly
|
- errname # erorrs are named correctly
|
||||||
- goconst # strings that should be constants
|
|
||||||
- godot # comments end in a period
|
|
||||||
- misspell
|
|
||||||
- nolintlint # "//nolint" directives are properly explained
|
- nolintlint # "//nolint" directives are properly explained
|
||||||
- revive # golint replacement
|
- revive # golint replacement
|
||||||
- stylecheck # golint replacement, less configurable than revive
|
|
||||||
- unconvert # unnecessary conversions
|
- unconvert # unnecessary conversions
|
||||||
- wastedassign
|
- wastedassign
|
||||||
|
|
||||||
@@ -23,9 +19,7 @@ linters:
|
|||||||
- exhaustive # check exhaustiveness of enum switch statements
|
- exhaustive # check exhaustiveness of enum switch statements
|
||||||
- gofmt # files are gofmt'ed
|
- gofmt # files are gofmt'ed
|
||||||
- gosec # security
|
- gosec # security
|
||||||
- nestif # deeply nested ifs
|
|
||||||
- nilerr # returns nil even with non-nil error
|
- nilerr # returns nil even with non-nil error
|
||||||
- prealloc # slices that can be pre-allocated
|
|
||||||
- structcheck # unused struct fields
|
- structcheck # unused struct fields
|
||||||
- unparam # unused function params
|
- unparam # unused function params
|
||||||
|
|
||||||
@@ -56,6 +50,8 @@ issues:
|
|||||||
|
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
|
exhaustive:
|
||||||
|
default-signifies-exhaustive: true
|
||||||
govet:
|
govet:
|
||||||
enable-all: true
|
enable-all: true
|
||||||
disable:
|
disable:
|
||||||
@@ -138,7 +134,3 @@ linters-settings:
|
|||||||
- VPCI
|
- VPCI
|
||||||
- WCOW
|
- WCOW
|
||||||
- WIM
|
- WIM
|
||||||
stylecheck:
|
|
||||||
checks:
|
|
||||||
- "all"
|
|
||||||
- "-ST1003" # use revive's var naming
|
|
||||||
|
|||||||
Reference in New Issue
Block a user