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:
|
run:
|
||||||
|
go: '1.17'
|
||||||
timeout: 30m
|
timeout: 30m
|
||||||
skip-files:
|
skip-files:
|
||||||
- "^zz_generated.*"
|
- "^zz_generated.*"
|
||||||
@ -27,15 +28,10 @@ linters:
|
|||||||
|
|
||||||
linters-settings: # please keep this alphabetized
|
linters-settings: # please keep this alphabetized
|
||||||
staticcheck:
|
staticcheck:
|
||||||
go: "1.17"
|
checks:
|
||||||
checks: [
|
- "all"
|
||||||
"all",
|
- "-SA1019" # TODO(fix) Using a deprecated function, variable, constant or field
|
||||||
"-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
|
||||||
"-SA2002" # TODO(fix) Called testing.T.FailNow or SkipNow in a goroutine, which isn’t allowed
|
|
||||||
]
|
|
||||||
stylecheck:
|
stylecheck:
|
||||||
checks: [
|
checks:
|
||||||
"ST1019", # Importing the same package multiple times.
|
- "ST1019" # Importing the same package multiple times.
|
||||||
]
|
|
||||||
unused:
|
|
||||||
go: "1.17"
|
|
||||||
|
8
Makefile
8
Makefile
@ -167,6 +167,10 @@ push-docker-release-main:
|
|||||||
$(info ETCD_VERSION: $(ETCD_VERSION))
|
$(info ETCD_VERSION: $(ETCD_VERSION))
|
||||||
docker push gcr.io/etcd-development/etcd:$(ETCD_VERSION)
|
docker push gcr.io/etcd-development/etcd:$(ETCD_VERSION)
|
||||||
|
|
||||||
lint:
|
|
||||||
# Recursively analyzes the tree:
|
# Recursively analyzes the tree:
|
||||||
golangci-lint -v run
|
lint:
|
||||||
|
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