-
Notifications
You must be signed in to change notification settings - Fork 72
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-file-types flag exludes aliases #216
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it implements everything I raised here.
#214 (comment)
But it's a good start for an implementation
name: "exclude json and yaml", | ||
input: "json,yaml", | ||
expectedExcludeFileTypes: []string{"json", "yaml", "yml"}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add tests about these cases I reported here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added test
By aliases, I meant something like the aliases you can find here https://github.com/github-linguist/linguist/blob/main/lib%2Flinguist%2Flanguages.yml I don't expect to implement everything of course. And yes, with the current file types, your implementation could be enough https://github.com/Boeing/config-file-validator/blob/main/pkg%2Ffiletype%2Ffile_type.go The only examples in the current list, I can think about is the .env, that people are more likely to call dotenv, so it could be an alias |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @veirfuna for the PR!
fix for #214
If file type is similar to one of extensions, then exclude all extensions
Before fix:
After fix: