Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
brew
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to JiHu GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KMSCAKKSCFKA AKFACAMADCAS
brew
Commits
2566ec85
Commit
2566ec85
authored
12 years ago
by
Adam Vandenberg
Browse files
Options
Downloads
Patches
Plain Diff
audit: complain until we use option and build
parent
78dcafaa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Library/Homebrew/cmd/audit.rb
+9
-6
9 additions, 6 deletions
Library/Homebrew/cmd/audit.rb
with
9 additions
and
6 deletions
Library/Homebrew/cmd/audit.rb
+
9
−
6
View file @
2566ec85
...
...
@@ -351,11 +351,6 @@ class FormulaAuditor
problem
"xcodebuild should be passed an explicit
\"
SYMROOT
\"
"
end
# using ARGV.flag? for formula options is generally a bad thing
if
text
=~
/ARGV\.flag\?/
problem
"Use 'ARGV.include?' instead of 'ARGV.flag?'"
end
# Avoid hard-coding compilers
if
text
=~
%r[(system|ENV
\[
.+
\]\s
?=)
\s
?['"](/usr/bin/)?(gcc|llvm-gcc|clang)['" ]]
problem
"Use
\"\#
{ENV.cc}
\"
instead of hard-coding
\"
#{
$3
}
\"
"
...
...
@@ -370,7 +365,15 @@ class FormulaAuditor
end
if
text
=~
/version == ['"]HEAD['"]/
problem
"Use 'ARGV.build_head?' instead of inspecting 'version'"
problem
"Use 'build.head?' instead of inspecting 'version'"
end
if
text
=~
/ARGV/
problem
"Use build instead of ARGV to check options."
end
if
text
=~
/def options/
problem
"Use new-style option definitions."
end
end
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment