File tree Expand file tree Collapse file tree 5 files changed +8
-36
lines changed
Expand file tree Collapse file tree 5 files changed +8
-36
lines changed Original file line number Diff line number Diff line change 22AllCops :
33 Exclude :
44 - vendor/**/*
5- Documentation :
6- Enabled : false
7- Layout/ParameterAlignment :
8- Enabled : true
9- HashSyntax :
10- Enabled : true
11- LineLength :
12- Enabled : false
13- EmptyLinesAroundBlockBody :
14- Enabled : false
15- Style/Encoding :
16- Enabled : false
17- MethodLength :
18- Max : 40
19- NumericLiterals :
20- MinDigits : 10
21- Metrics/BlockLength :
22- Max : 35
23- Metrics/CyclomaticComplexity :
24- Max : 10
25- Metrics/PerceivedComplexity :
26- Max : 10
27- Metrics/AbcSize :
28- Max : 30
29- # Lint/AmbiguousBlockAssociation is incompatible with RSpec
30- # https://github.com/rubocop-hq/rubocop/issues/4222
31- Lint/AmbiguousBlockAssociation :
32- Enabled : false
Original file line number Diff line number Diff line change 22
33source 'https://rubygems.org'
44
5+ gem 'cookstyle'
56gem 'highline'
67gem 'rack'
78gem 'rake'
Original file line number Diff line number Diff line change 11#!/usr/bin/env rake
2- # encoding: utf-8
32# frozen_string_literal: true
43
4+ require 'cookstyle'
55require 'rake/testtask'
66require 'rubocop/rake_task'
77
@@ -11,6 +11,10 @@ task :rubocop do
1111 RuboCop ::RakeTask . new
1212end
1313
14+ RuboCop ::RakeTask . new ( :cookstyle ) do |task |
15+ task . options << '--display-cop-names'
16+ end
17+
1418# lint the project
1519desc 'Run robocop linter'
1620task lint : [ :rubocop ]
@@ -46,5 +50,4 @@ task :changelog do
4650 Rake ::Task [ :changelog ] . execute
4751rescue LoadError
4852 puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'
49-
5053end
Original file line number Diff line number Diff line change 1- # encoding: utf-8
21# frozen_string_literal: true
32
43# copyright: 2016, Christoph Hartmann
Original file line number Diff line number Diff line change 1- # encoding: utf-8
21# frozen_string_literal: true
32
43# copyright: 2016, Christoph Hartmann
@@ -49,7 +48,7 @@ def updates
4948 end
5049
5150 def uptodate?
52- return nil if @update_mgmt . nil?
51+ return if @update_mgmt . nil?
5352
5453 u = @update_mgmt . updates
5554 return false if u . nil? || !u [ 'available' ] . empty?
@@ -198,7 +197,6 @@ def debian_base
198197
199198class RHELUpdateFetcher < UpdateFetcher
200199 def packages
201- # rubocop:disable Style/FormatStringToken
202200 rhel_packages = <<~PRINT_JSON
203201 sleep 2 && echo " "
204202 echo -n '{"installed":['
@@ -207,7 +205,6 @@ def packages
207205 echo -n ']}'
208206 PRINT_JSON
209207 parse_json ( rhel_packages )
210- # rubocop:enable Style/FormatStringToken
211208 end
212209
213210 def updates
@@ -219,7 +216,7 @@ def updates
219216 unless cmd . exit_status . zero?
220217 # essentially we want https://github.com/chef/inspec/issues/1205
221218 warn 'Could not determine patch status.'
222- return nil
219+ return
223220 end
224221
225222 first = cmd . stdout . index ( '{' )
You can’t perform that action at this time.
0 commit comments