-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Style/FileName should accept a regex parameter #1545
Comments
Same thing for Style/CommentAnnotation, I don't really like to add a colon in TODO comment about stuffBut in order to just drop the colon from the rule it seems like my only option is to use a rubocop fork. It would be much better if the format was detailed in a regex that I could change in my .rubocop.yml conf file. |
Are you looking for a "good" regex which must match, or a "bad" regex which must not match? |
Hmm. If there is enough demand for this, I would code something up, but I doubt that there is. I am inclined to suggest that a custom cop would be your best bet. Right now we don't have an official, documented API for custom cops, but there will be before long. |
Ping @lloeki. |
The "good" one, looking for a match. |
Maintainers, what do you say? |
A positive regex for how file names should look sounds good to me. |
Should the regex be applied only to the basename? Or the entire path? Or each component of the path individually? |
Only the basename is ok for me. I think that's what we're checking today. |
Do we drop the |
I think I know the answer. Opening PR now. |
Homebrew has formula files with dashes, but otherwise respect the convention, while other projects may have stricter rules than the default. Having a regex parameter available to enforce one's own rules will certainly be useful.
The text was updated successfully, but these errors were encountered: