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

prepareSkips: to resolve regexps in excludes #1060

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

Conversation

mfederowicz
Copy link
Contributor

related #1011

I know that we use https://github.com/mgechev/dots to process includePatterns and excludePatterns but I think there is better solution for that (https://github.com/bmatcuk/doublestar)

func Glob(fsys fs.FS, pattern string, opts ...GlobOption) ([]string, error) - return matching paths wehre pattern can be regexp or normal file path

my PR uses that function and converts regexp pattern to list of paths which next can be used to process packages in dots.ResolvePackages (of course if we set more then one includepath it will be processed individualy)

example:

./revive -exclude '**/linux*' -formatter friendly ./... vendor/...

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