mgechev / revive

🔥 ~6x faster, stricter, configurable, extensible, and beautiful drop-in replacement for golint
https://revive.run
MIT License
4.73k stars 276 forks source link

Test files are not checked in dot-imports #883

Closed denisvmedia closed 1 year ago

denisvmedia commented 1 year ago

Describe the bug We would like to have no exceptions even for test files on dot-imports. Unfortunately, the linter rule has a hard-coded check disabled.

To Reproduce Have a _test.go file with dot imports and try using the linter.

Expected behavior Linter should detect those.

Additional context We might have it as a config option set by default to ignore test files or just remove the hardcoded check and let the users re-configure their linters to ignore tests separately.

I can provide a PR if you agree.

chavacava commented 1 year ago

Hi @denisvmedia thanks for creating the ticket. I think we can just remove the hardcoded check and let users use the new exclude argument available on all rules.

A PR is welcome :)