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
b72e7ee3
Commit
b72e7ee3
authored
4 years ago
by
Markus Reiter
Browse files
Options
Downloads
Patches
Plain Diff
Only treat `cask audit` warnings as errors if `--strict` is passed.
parent
e4356e85
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Library/Homebrew/cask/audit.rb
+9
-7
9 additions, 7 deletions
Library/Homebrew/cask/audit.rb
Library/Homebrew/cask/cmd/audit.rb
+1
-3
1 addition, 3 deletions
Library/Homebrew/cask/cmd/audit.rb
with
10 additions
and
10 deletions
Library/Homebrew/cask/audit.rb
+
9
−
7
View file @
b72e7ee3
...
...
@@ -30,8 +30,8 @@ module Cask
appcast
=
online
if
appcast
.
nil?
download
=
online
if
download
.
nil?
# `
strict
` implies `token_conflicts`
token_conflicts
=
strict
if
token_conflicts
.
nil?
# `
new_cask
` implies `token_conflicts`
token_conflicts
=
new_cask
if
token_conflicts
.
nil?
@cask
=
cask
@appcast
=
appcast
...
...
@@ -91,7 +91,11 @@ module Cask
end
def
add_warning
(
message
)
warnings
<<
message
if
strict?
add_error
message
else
warnings
<<
message
end
end
def
errors?
...
...
@@ -299,11 +303,9 @@ module Cask
end
def
check_desc
return
unless
new_cask?
return
if
cask
.
desc
.
present?
add_
error
"Cask should have a description. Please add a `desc` stanza."
add_
warning
"Cask should have a description. Please add a `desc` stanza."
end
def
check_url
...
...
@@ -380,7 +382,7 @@ module Cask
end
def
check_token_bad_words
return
unless
strict
?
return
unless
new_cask
?
token
=
cask
.
token
...
...
This diff is collapsed.
Click to expand it.
Library/Homebrew/cask/cmd/audit.rb
+
1
−
3
View file @
b72e7ee3
...
...
@@ -59,8 +59,6 @@ module Cask
odebug
"Auditing Cask
#{
cask
}
"
result
=
Auditor
.
audit
(
cask
,
**
options
)
next
true
if
result
[
:warnings
].
empty?
&&
result
[
:errors
].
empty?
if
ENV
[
"GITHUB_ACTIONS"
]
cask_path
=
cask
.
sourcefile_path
annotations
=
(
result
[
:warnings
].
map
{
|
w
|
[
:warning
,
w
]
}
+
result
[
:errors
].
map
{
|
e
|
[
:error
,
e
]
})
...
...
@@ -71,7 +69,7 @@ module Cask
end
end
false
result
[
:errors
].
empty?
end
return
if
failed_casks
.
empty?
...
...
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