RuboCop & Ruby 2.7 updates

This commit is contained in:
Gene Liverman 2020-07-03 14:49:20 -04:00
parent 96f564b460
commit 540ffab179
No known key found for this signature in database
GPG key ID: 66D794FE7043CBCA
7 changed files with 44 additions and 31 deletions

View file

@ -14,13 +14,8 @@ exclude_paths = [
'spec/**/*'
]
RuboCop::RakeTask.new(:rubocop) do |task|
# task.patterns = ['lib/**/*.rb']
# only show the files with failures
# task.formatters = ['files']
# don't abort rake on failure
# task.fail_on_error = false
end
# https://docs.rubocop.org/rubocop/0.86/integration_with_other_tools.html#rake-integration
RuboCop::RakeTask.new
PuppetLint::RakeTask.new :lint do |config|
config.fail_on_warnings = true
@ -37,9 +32,9 @@ task :validate do
end
Dir['bin/**/*.rb',
'spec/**/*.rb'].each do |ruby_file|
# rubocop:disable RegexpLiteral
# rubocop:disable Style/RegexpLiteral
sh "ruby -c #{ruby_file}" unless ruby_file =~ /spec\/fixtures/
# rubocop:enable RegexpLiteral
# rubocop:enable Style/RegexpLiteral
end
Dir['puppet/site/*/templates/**/*.erb'].each do |template|
sh "erb -P -x -T '-' #{template} | ruby -c"