Skip to content

Commit

Permalink
Use theforeman-rubocop gem
Browse files Browse the repository at this point in the history
Choose to inherit default.yml style because this rules have target ruby
and rails version included. Also dropped some cops from here because that
was either included in the inherit file or was not needed anymore and
fixed some fo the cops like Rails/Date and Gemspec/RequiredRubyVersion.
  • Loading branch information
archanaserver authored and stejskalleos committed Jul 29, 2024
1 parent 29fbd7b commit 95972fb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ jobs:
rubocop:
name: Rubocop
uses: theforeman/actions/.github/workflows/rubocop.yml@v0
with:
command: bundle exec rubocop --parallel --format github
19 changes: 5 additions & 14 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
require:
- rubocop-performance
inherit_gem:
theforeman-rubocop:
- default.yml

Style/Documentation:
Enabled: false
Lint/RaiseException:
Enabled: true
Lint/StructNewOverride:
Enabled: true
Style/HashEachMethods:
Enabled: true
Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
AllCops:
TargetRubyVersion: 2.7
5 changes: 1 addition & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,4 @@ gemspec
gem 'gettext', '>= 3.1.3', '< 4.0.0'
gem 'rake', '~> 13.0'

group :test do
gem 'rubocop', '~> 1.57.0'
gem 'rubocop-performance', '~> 1.5.2'
end
gem 'theforeman-rubocop', '~> 0.1.0'
2 changes: 1 addition & 1 deletion hammer_cli_foreman_leapp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
spec.name = 'hammer_cli_foreman_leapp'
spec.version = HammerCLIForemanLeapp.version.dup
spec.license = 'GPL-3.0'
spec.date = Date.today.to_s
spec.date = Time.now.utc.to_date.to_s
spec.authors = ['Foreman Leapp team']
spec.email = ['[email protected]']
spec.homepage = 'https://github.com/stejskalleos/hammer-cli-foreman-leapp'
Expand Down

0 comments on commit 95972fb

Please sign in to comment.