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
08396a55
Commit
08396a55
authored
4 years ago
by
Dustin Rodrigues
Browse files
Options
Downloads
Patches
Plain Diff
audit: always audit GitHub license
parent
c61427db
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/dev-cmd/audit.rb
+7
-1
7 additions, 1 deletion
Library/Homebrew/dev-cmd/audit.rb
with
7 additions
and
1 deletion
Library/Homebrew/dev-cmd/audit.rb
+
7
−
1
View file @
08396a55
...
...
@@ -350,6 +350,11 @@ module Homebrew
"LGPL-3.0"
=>
[
"LGPL-3.0-only"
,
"LGPL-3.0-or-later"
],
}.
freeze
PERMITTED_FORMULA_LICENSE_MISMATCHES
=
{
"cmockery"
=>
"0.1.2"
,
"scw@1"
=>
"1.20"
,
}.
freeze
def
audit_license
if
formula
.
license
.
present?
non_standard_licenses
=
formula
.
license
.
map
do
|
license
|
...
...
@@ -380,12 +385,13 @@ module Homebrew
return
unless
@online
user
,
repo
=
get_repo_data
(
%r{https?://github
\.
com/([^/]+)/([^/]+)/?.*}
)
if
@new_formula
user
,
repo
=
get_repo_data
(
%r{https?://github
\.
com/([^/]+)/([^/]+)/?.*}
)
return
if
user
.
blank?
github_license
=
GitHub
.
get_repo_license
(
user
,
repo
)
return
if
github_license
&&
(
formula
.
license
+
[
"NOASSERTION"
]).
include?
(
github_license
)
return
if
PERMITTED_LICENSE_MISMATCHES
[
github_license
]
&
.
any?
{
|
license
|
formula
.
license
.
include?
license
}
return
if
PERMITTED_FORMULA_LICENSE_MISMATCHES
[
formula
.
name
]
==
formula
.
version
problem
"Formula license
#{
formula
.
license
}
does not match GitHub license
#{
Array
(
github_license
)
}
."
...
...
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