mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
Change after code review on cookstyle check
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
This commit is contained in:
parent
811e10b606
commit
ced270725d
5 changed files with 6 additions and 6 deletions
3
Gemfile
3
Gemfile
|
@ -20,9 +20,6 @@ end
|
|||
# but our runtime dep is still 3.9+
|
||||
gem "rspec", ">= 3.10"
|
||||
|
||||
# checks code offenses with inspec check
|
||||
gem "cookstyle"
|
||||
|
||||
group :omnibus do
|
||||
gem "rb-readline"
|
||||
gem "appbundler"
|
||||
|
|
|
@ -34,4 +34,7 @@ Gem::Specification.new do |spec|
|
|||
spec.add_dependency "train-aws", "~> 0.2"
|
||||
spec.add_dependency "train-winrm", "~> 0.2"
|
||||
spec.add_dependency "mongo", "= 2.13.2" # 2.14 introduces a broken symlink in mongo-2.14.0/spec/support/ocsp
|
||||
|
||||
# checks code offenses with inspec check
|
||||
spec.add_dependency "cookstyle"
|
||||
end
|
||||
|
|
|
@ -123,7 +123,7 @@ class Inspec::InspecCLI < Inspec::BaseCLI
|
|||
puts
|
||||
|
||||
if result[:errors].empty? && result[:warnings].empty? && result[:offenses].empty?
|
||||
ui.plain_line("No errors or warnings or offenses")
|
||||
ui.plain_line("No errors, warnings, or offenses")
|
||||
else
|
||||
item_msg = lambda { |item|
|
||||
pos = [item[:file], item[:line], item[:column]].compact.join(":")
|
||||
|
|
|
@ -402,7 +402,7 @@ module Inspec
|
|||
spec.options += [
|
||||
"--display-cop-names",
|
||||
"--parallel",
|
||||
"--only=InSpec/Deprecations,InSpec/Deprecations/AttributeHelper,InSpec/Deprecations/AttributeDefault",
|
||||
"--only=InSpec/Deprecations",
|
||||
]
|
||||
spec.patterns += Dir.glob("#{@target}/**/*.rb").reject { |f| File.directory?(f) }
|
||||
spec.fail_on_error = false
|
||||
|
|
|
@ -121,7 +121,7 @@ describe "inspec check" do
|
|||
describe "inspec check also check for cookstyle offenses" do
|
||||
it "finds no offenses in a complete profile" do
|
||||
out = inspec("check #{profile_path}/complete-profile")
|
||||
_(out.stdout).must_match(/No errors or warnings or offenses/)
|
||||
_(out.stdout).must_match(/No errors, warnings, or offenses/)
|
||||
assert_exit_code 0, out
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue