mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #14488 from serathius/update-fix
Improve static analysis fixing scripts
This commit is contained in:
commit
6333f375a7
3
.github/workflows/static-analysis.yaml
vendored
3
.github/workflows/static-analysis.yaml
vendored
@ -12,4 +12,5 @@ jobs:
|
||||
uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
version: v1.49.0
|
||||
- run: make verify
|
||||
- run: make verify
|
||||
- run: make fix
|
||||
|
@ -67,8 +67,8 @@ See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for de
|
||||
Please ensure that your change passes static analysis (requires [golangci-lint](https://golangci-lint.run/usage/install/)):
|
||||
- `make verify` to verify if all checks pass.
|
||||
- `make verify-*` to verify a single check, for example `make verify-bom` to verify if bill-of-materials.json file is up-to-date.
|
||||
- `make update` to fix all checks.
|
||||
- `make update-*` to fix a single checks, for example `make update-bom` to update bill-of-materials.json.
|
||||
- `make fix` to fix all checks.
|
||||
- `make fix-*` to fix a single checks, for example `make fix-bom` to update bill-of-materials.json.
|
||||
|
||||
Please ensure that your change passes tests.
|
||||
- `make test-unit` to run unit tests.
|
||||
|
21
Makefile
21
Makefile
@ -29,8 +29,9 @@ test-e2e-release: build
|
||||
|
||||
# Static analysis
|
||||
|
||||
verify: verify-gofmt verify-bom verify-lint verify-dep verify-shellcheck verify-goword verify-govet verify-revive verify-license-header verify-receiver-name verify-mod-tidy verify-shellcheck verify-shellws verify-proto-annotations
|
||||
update: update-bom update-lint update-dep update-fix
|
||||
verify: verify-gofmt verify-bom verify-lint verify-dep verify-shellcheck verify-goword verify-govet verify-license-header verify-receiver-name verify-mod-tidy verify-shellcheck verify-shellws verify-proto-annotations
|
||||
fix: fix-bom fix-lint
|
||||
./scripts/fix.sh
|
||||
|
||||
.PHONY: verify-gofmt
|
||||
verify-gofmt:
|
||||
@ -41,29 +42,21 @@ verify-bom:
|
||||
PASSES="bom" ./scripts/test.sh
|
||||
|
||||
.PHONY: update-bom
|
||||
update-bom:
|
||||
fix-bom:
|
||||
./scripts/updatebom.sh
|
||||
|
||||
.PHONY: verify-dep
|
||||
verify-dep:
|
||||
PASSES="dep" ./scripts/test.sh
|
||||
|
||||
.PHONY: update-dep
|
||||
update-dep:
|
||||
./scripts/update_dep.sh
|
||||
|
||||
.PHONY: verify-lint
|
||||
verify-lint:
|
||||
golangci-lint run
|
||||
|
||||
.PHONY: update-lint
|
||||
update-lint:
|
||||
fix-lint:
|
||||
golangci-lint run --fix
|
||||
|
||||
.PHONY: update-fix
|
||||
update-fix:
|
||||
./scripts/fix.sh
|
||||
|
||||
.PHONY: verify-shellcheck
|
||||
verify-shellcheck:
|
||||
PASSES="shellcheck" ./scripts/test.sh
|
||||
@ -76,10 +69,6 @@ verify-goword:
|
||||
verify-govet:
|
||||
PASSES="govet" ./scripts/test.sh
|
||||
|
||||
.PHONY: verify-revive
|
||||
verify-revive:
|
||||
PASSES="revive" ./scripts/test.sh
|
||||
|
||||
.PHONY: verify-license-header
|
||||
verify-license-header:
|
||||
PASSES="license_header" ./scripts/test.sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user