Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude files base on patterns #1011

Open
slifer2015 opened this issue Jul 12, 2024 · 0 comments
Open

Exclude files base on patterns #1011

slifer2015 opened this issue Jul 12, 2024 · 0 comments

Comments

@slifer2015
Copy link

slifer2015 commented Jul 12, 2024

Exclude files base on patterns
I want to exclude file base on pattern , for example exclude all test files

To Reproduce
Steps to reproduce the behavior:

  1. I updated revive go install github.com/mgechev/revive@latest
  2. I run it with the following flags & configuration file:
EXCLUDE_PATTERNS := \
	--exclude '**/*_test.go'

.PHONY: lint
lint:
	docker run --rm \
		-v $(PWD):/app \
		-w /app \
		ghcr.io/mgechev/revive:v1.3.7 \
                $(EXCLUDE_PATTERNS) \
		-config revive.toml \
		-formatter friendly \
		./...
enableAllRules = true

Expected behavior
I expected that files end of _test.go is excluded but It's not happening and still getting lint for test files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants