Skip to content

Exclude files base on patterns #1011

@slifer2015

Description

@slifer2015

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions