-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
audit: complain about uppercase formula names #11447
audit: complain about uppercase formula names #11447
Conversation
Our docs state that formula filenames must not have uppercase letters. This adds a test to expect that FormulaAuditor's audit_formula_name method complains about such a formula.
Check for uppercase formula names in audit_formula_name method of formula_auditor.
Review period will end on 2021-05-31 at 01:00:34 UTC. |
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 agree this audit makes sense, but I can't help but wonder whether the issue is really in Formulary
's handling of this. I wonder if it should either downcase before initializing the formula or Formula#new
should downcase the name before assigning.
Review period ended. |
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.
Makes sense to me! I agree with @Rylan12's comment but this PR is good to go as-is, I think.
brew/Library/Homebrew/github_packages.rb
Lines 134 to 136 in b6cfafe
# TODO: consider changing the actual versions here and make an audit to | |
# avoid these weird characters being used | |
version_rebuild.gsub(/[+#~]/, ".") |
This may be interesting to you, too. Would love a PR that also audits versions to match the format we want (so we don't have to hack around it like this).
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?As recently discussed in #11440 (comment), our docs state that "Filenames should be all lowercase". This adds an audit to complain about formula names with uppercase letters and a test.