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

add two new flags for glob support #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ksdpmx
Copy link

@ksdpmx ksdpmx commented Apr 17, 2024

There're some hardcoded directories and files excluded implicitly.
And sometimes we may need some kind of flexibility for specifing exclusions,

  1. ignoring some files inside of one folder
  2. ignoring multiple folders with naming convention.

So here introducing two new opt-in flags:

  • -exclude-dirs
  • -exclude-files

The default behavior for these two flags aligns with the existing -excludes for backward compatiblity.
And glob matching is supported, e.g. ./ltag -check -v -path ./test -exclude-dirs ".git .svn vendor image/module[abc]" -exclude-files "LICENSE MAINTAINERS OWNERS test/temp.go test/internal/foo*.go".
-excludes can be deleted if breaking change is acceptable.

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

Successfully merging this pull request may close these issues.

1 participant