mirror of
https://github.com/containers/skopeo.git
synced 2025-04-27 11:01:18 +00:00
Makefile: add linting with --tests=false
Sometimes running golangci-lint with --tests=false helps to uncover some unused code which was not removed because it has unit tests. Since everything is already cached, this additional run doesn't take much time. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
d66183b129
commit
f4d30802b2
4
Makefile
4
Makefile
@ -238,6 +238,10 @@ validate-local:
|
|||||||
hack/validate-git-marks.sh
|
hack/validate-git-marks.sh
|
||||||
hack/validate-gofmt.sh
|
hack/validate-gofmt.sh
|
||||||
$(GOBIN)/golangci-lint run --build-tags "${BUILDTAGS}"
|
$(GOBIN)/golangci-lint run --build-tags "${BUILDTAGS}"
|
||||||
|
# An extra run with --tests=false allows detecting code unused outside of tests;
|
||||||
|
# ideally the linter should be able to find this automatically.
|
||||||
|
# Since everything is already cached, this additional run doesn't take much time.
|
||||||
|
$(GOBIN)/golangci-lint run --build-tags "${BUILDTAGS}" --tests=false
|
||||||
BUILDTAGS="${BUILDTAGS}" hack/validate-vet.sh
|
BUILDTAGS="${BUILDTAGS}" hack/validate-vet.sh
|
||||||
|
|
||||||
# This invokes bin/skopeo, hence cannot be run as part of validate-local
|
# This invokes bin/skopeo, hence cannot be run as part of validate-local
|
||||||
|
Loading…
Reference in New Issue
Block a user