audit: messaging improvements
This commit is contained in:
parent
1745db8000
commit
7698cf2098
@ -50,7 +50,7 @@ module Cask
|
|||||||
if !language && language_blocks
|
if !language && language_blocks
|
||||||
sample_languages = if language_blocks.length > LANGUAGE_BLOCK_LIMIT && !@audit_new_cask
|
sample_languages = if language_blocks.length > LANGUAGE_BLOCK_LIMIT && !@audit_new_cask
|
||||||
sample_keys = language_blocks.keys.sample(LANGUAGE_BLOCK_LIMIT)
|
sample_keys = language_blocks.keys.sample(LANGUAGE_BLOCK_LIMIT)
|
||||||
ohai "Auditing a sample of available languages: #{sample_keys.map { |lang| lang[0].to_s }.to_sentence}"
|
ohai "Auditing a sample of available languages for #{cask}: #{sample_keys.map { |lang| lang[0].to_s }.to_sentence}"
|
||||||
language_blocks.select { |k| sample_keys.include?(k) }
|
language_blocks.select { |k| sample_keys.include?(k) }
|
||||||
else
|
else
|
||||||
language_blocks
|
language_blocks
|
||||||
|
@ -415,7 +415,7 @@ module Homebrew
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
it "checks online and verifies that a standard license id is in the same exempted license group" \
|
it "checks online and verifies that a standard license id is in the same exempted license group " \
|
||||||
"as what is indicated on its GitHub repo", :needs_network do
|
"as what is indicated on its GitHub repo", :needs_network do
|
||||||
fa = formula_auditor "cask", <<~RUBY, spdx_license_data: spdx_license_data, online: true, new_formula: true
|
fa = formula_auditor "cask", <<~RUBY, spdx_license_data: spdx_license_data, online: true, new_formula: true
|
||||||
class Cask < Formula
|
class Cask < Formula
|
||||||
@ -429,7 +429,7 @@ module Homebrew
|
|||||||
expect(fa.problems).to be_empty
|
expect(fa.problems).to be_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
it "checks online and verifies that a standard license array is in the same exempted license group" \
|
it "checks online and verifies that a standard license array is in the same exempted license group " \
|
||||||
"as what is indicated on its GitHub repo", :needs_network do
|
"as what is indicated on its GitHub repo", :needs_network do
|
||||||
fa = formula_auditor "cask", <<~RUBY, spdx_license_data: spdx_license_data, online: true, new_formula: true
|
fa = formula_auditor "cask", <<~RUBY, spdx_license_data: spdx_license_data, online: true, new_formula: true
|
||||||
class Cask < Formula
|
class Cask < Formula
|
||||||
|
@ -210,7 +210,7 @@ describe SoftwareSpec do
|
|||||||
expect(spec.declared_deps.first).to be_use_macos_install
|
expect(spec.declared_deps.first).to be_use_macos_install
|
||||||
end
|
end
|
||||||
|
|
||||||
it "add a macOS dependency if the OS version doesn't meet requirements" do
|
it "adds a macOS dependency if the OS version doesn't meet requirements" do
|
||||||
spec.uses_from_macos("foo", since: :high_sierra)
|
spec.uses_from_macos("foo", since: :high_sierra)
|
||||||
|
|
||||||
expect(spec.declared_deps).not_to be_empty
|
expect(spec.declared_deps).not_to be_empty
|
||||||
|
@ -142,7 +142,7 @@ module SharedAudits
|
|||||||
metadata = JSON.parse(out)
|
metadata = JSON.parse(out)
|
||||||
return if metadata.nil?
|
return if metadata.nil?
|
||||||
|
|
||||||
return "Uses deprecated mercurial support in Bitbucket" if metadata["scm"] == "hg"
|
return "Uses deprecated Mercurial support in Bitbucket" if metadata["scm"] == "hg"
|
||||||
|
|
||||||
return "Bitbucket fork (not canonical repository)" unless metadata["parent"].nil?
|
return "Bitbucket fork (not canonical repository)" unless metadata["parent"].nil?
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user