Skip to content

Commit

Permalink
Fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
ofedoren committed Jan 15, 2024
1 parent 99a0c2a commit d9962d2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
23 changes: 6 additions & 17 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,6 @@ Rails/Delegate:
Exclude:
- 'app/models/foreman_openscap/asset.rb'

# Offense count: 18
# Configuration parameters: Include.
# Include: app/models/**/*.rb
Rails/HasManyOrHasOneDependent:
Exclude:
- 'app/models/concerns/foreman_openscap/oval_facet_host_extensions.rb'
- 'app/models/concerns/foreman_openscap/smart_proxy_extensions.rb'
- 'app/models/foreman_openscap/arf_report.rb'
- 'app/models/foreman_openscap/asset.rb'
- 'app/models/foreman_openscap/cve.rb'
- 'app/models/foreman_openscap/oval_content.rb'
- 'app/models/foreman_openscap/oval_policy.rb'
- 'app/models/foreman_openscap/policy.rb'
- 'app/models/foreman_openscap/scap_content.rb'
- 'app/models/foreman_openscap/scap_content_profile.rb'
- 'app/models/foreman_openscap/tailoring_file.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand Down Expand Up @@ -181,3 +164,9 @@ Rails/TimeZone:

Rails/HasManyOrHasOneDependent:
Enabled: false

Rails/RefuteMethods:
Enabled: false

Lint/BooleanSymbol:
Enabled: false
12 changes: 12 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,15 @@ Rake::TestTask.new(:test) do |t|
end

task :default => :test

task :rubocop do
require 'rubocop/rake_task'
RuboCop::RakeTask.new do |task|
task.options = ['--config', '.rubocop.yml']
task.patterns = ["app/**/*.rb",
"lib/**/*.rb",
"test/**/*.rb"]
end
rescue StandardError
puts 'Rubocop not loaded.'
end

0 comments on commit d9962d2

Please sign in to comment.