audit: rename spdx_id to spdx_data
This commit is contained in:
parent
de7edd403d
commit
8d7a9d51d3
@ -112,8 +112,8 @@ module Homebrew
|
|||||||
style_results = Style.check_style_json(style_files, options) if style_files
|
style_results = Style.check_style_json(style_files, options) if style_files
|
||||||
# load licenses
|
# load licenses
|
||||||
full_path = File.join(File.dirname(__FILE__), "../data/spdx.json")
|
full_path = File.join(File.dirname(__FILE__), "../data/spdx.json")
|
||||||
spdx_ids = File.open(full_path, "r") do |f|
|
spdx_data = File.open(full_path, "r") do |file|
|
||||||
JSON.parse(f.read)
|
JSON.parse(file.read)
|
||||||
end
|
end
|
||||||
new_formula_problem_lines = []
|
new_formula_problem_lines = []
|
||||||
audit_formulae.sort.each do |f|
|
audit_formulae.sort.each do |f|
|
||||||
@ -125,7 +125,7 @@ module Homebrew
|
|||||||
git: git,
|
git: git,
|
||||||
only: only,
|
only: only,
|
||||||
except: args.except,
|
except: args.except,
|
||||||
spdx_ids: spdx_ids,
|
spdx_data: spdx_data,
|
||||||
}
|
}
|
||||||
options[:style_offenses] = style_results.file_offenses(f.path) if style_results
|
options[:style_offenses] = style_results.file_offenses(f.path) if style_results
|
||||||
options[:display_cop_names] = args.display_cop_names?
|
options[:display_cop_names] = args.display_cop_names?
|
||||||
@ -229,7 +229,7 @@ module Homebrew
|
|||||||
@new_formula_problems = []
|
@new_formula_problems = []
|
||||||
@text = FormulaText.new(formula.path)
|
@text = FormulaText.new(formula.path)
|
||||||
@specs = %w[stable devel head].map { |s| formula.send(s) }.compact
|
@specs = %w[stable devel head].map { |s| formula.send(s) }.compact
|
||||||
@spdx_ids = options[:spdx_ids]
|
@spdx_data = options[:spdx_data]
|
||||||
end
|
end
|
||||||
|
|
||||||
def audit_style
|
def audit_style
|
||||||
@ -350,7 +350,7 @@ module Homebrew
|
|||||||
|
|
||||||
def audit_license
|
def audit_license
|
||||||
if formula.license.present?
|
if formula.license.present?
|
||||||
if @spdx_ids.key?(formula.license)
|
if @spdx_data.key?(formula.license)
|
||||||
return unless @online
|
return unless @online
|
||||||
|
|
||||||
user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*})
|
user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user