exclude new tools vendor dir from validate

We have no control over the code in the vendored files.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2022-05-04 15:01:23 +02:00
parent f6b397bf1e
commit 3866143675
13 changed files with 15 additions and 20 deletions

View File

@ -1,5 +1,5 @@
---
exclude: ^vendor/
exclude: ^vendor/|^test/tools/vendor/
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v3.4.0

View File

@ -232,7 +232,7 @@ endif
.PHONY: .gitvalidation
.gitvalidation: .gopathok
@echo "Validating vs commit '$(call err_if_empty,EPOCH_TEST_COMMIT)'"
GIT_CHECK_EXCLUDE="./vendor:docs/make.bat:test/buildah-bud/buildah-tests.diff" ./test/tools/build/git-validation -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
GIT_CHECK_EXCLUDE="./vendor:./test/tools/vendor:docs/make.bat:test/buildah-bud/buildah-tests.diff" ./test/tools/build/git-validation -run DCO,short-subject,dangling-whitespace -range $(EPOCH_TEST_COMMIT)..$(HEAD)
.PHONY: lint
lint: golangci-lint
@ -254,6 +254,7 @@ gofmt: ## Verify the source code gofmt
-name '.golangci.yml' -o \
-name 'Makefile' -o \
-path './vendor/*' -prune -o \
-path './test/tools/vendor/*' -prune -o \
-path './contrib/*' -prune \
\) -exec gofmt -d -e -s -w {} \+
git diff --exit-code

View File

@ -32,4 +32,3 @@ check-mod: # verifies that module changes for go.mod and go.sum are checked in
.PHONY: vendor
vendor: mod
@go mod vendor -v

View File

@ -20,4 +20,3 @@ go-md2man 1 "January 2015" go-md2man "User Manual"
# HISTORY
January 2015, Originally compiled by Brian Goff( cpuguy83@gmail.com )

View File

@ -351,4 +351,3 @@ Exhibit B - “Incompatible With Secondary Licenses” Notice
This Source Code Form is “Incompatible
With Secondary Licenses”, as defined by
the Mozilla Public License, v. 2.0.

View File

@ -10,4 +10,3 @@ func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
}

View File

@ -10,4 +10,3 @@ func isTerminal(fd int) bool {
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
return err == nil
}

View File

@ -103,4 +103,3 @@ See [`./rules/`](./rules/).
Feel free to contribute more.
Otherwise, by using `validate` package API directly, rules can be handed directly to the `validate.Runner`.