mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
RuboCop & Ruby 2.7 updates
This commit is contained in:
parent
96f564b460
commit
540ffab179
7 changed files with 44 additions and 31 deletions
13
Rakefile
13
Rakefile
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue