mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Followup to "Add golangci-lint config file"
Addressed comments by @ldez and added `lint-fix` target. Signed-off-by: Ramsés Morales <ramses@gmail.com>
This commit is contained in:
parent
a7a48168a0
commit
3cdc4225e1
@ -1,4 +1,5 @@
|
||||
run:
|
||||
go: '1.17'
|
||||
timeout: 30m
|
||||
skip-files:
|
||||
- "^zz_generated.*"
|
||||
@ -27,15 +28,10 @@ linters:
|
||||
|
||||
linters-settings: # please keep this alphabetized
|
||||
staticcheck:
|
||||
go: "1.17"
|
||||
checks: [
|
||||
"all",
|
||||
"-SA1019", # TODO(fix) Using a deprecated function, variable, constant or field
|
||||
"-SA2002" # TODO(fix) Called testing.T.FailNow or SkipNow in a goroutine, which isn’t allowed
|
||||
]
|
||||
checks:
|
||||
- "all"
|
||||
- "-SA1019" # TODO(fix) Using a deprecated function, variable, constant or field
|
||||
- "-SA2002" # TODO(fix) Called testing.T.FailNow or SkipNow in a goroutine, which isn’t allowed
|
||||
stylecheck:
|
||||
checks: [
|
||||
"ST1019", # Importing the same package multiple times.
|
||||
]
|
||||
unused:
|
||||
go: "1.17"
|
||||
checks:
|
||||
- "ST1019" # Importing the same package multiple times.
|
||||
|
8
Makefile
8
Makefile
@ -167,6 +167,10 @@ push-docker-release-main:
|
||||
$(info ETCD_VERSION: $(ETCD_VERSION))
|
||||
docker push gcr.io/etcd-development/etcd:$(ETCD_VERSION)
|
||||
|
||||
# Recursively analyzes the tree:
|
||||
lint:
|
||||
# Recursively analyzes the tree:
|
||||
golangci-lint -v run
|
||||
golangci-lint run
|
||||
|
||||
# Fixes found issues, if supported by the linter:
|
||||
lint-fix:
|
||||
golangci-lint run --fix
|
||||
|
Loading…
x
Reference in New Issue
Block a user