Skip to content

Commit

Permalink
Improve RuboCop configuration with GitHub Actions integration
Browse files Browse the repository at this point in the history
Added RuboCop configurations to enhance code quality
checks and integrated GitHub Actions formatter for
improved code review experience in pull requests.
  • Loading branch information
archanaserver committed Aug 7, 2023
1 parent d0ece47 commit 7ef8afb
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,12 @@ namespace 'test' do
end
end

begin
require 'rubocop/rake_task'
RuboCop::RakeTask.new
rescue LoadError
puts 'Rubocop not loaded'
require 'rubocop/rake_task'
RuboCop::RakeTask.new(:rubocop) do |task|
# These make the rubocop experience maybe slightly less terrible
task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
# Use Rubocop's Github Actions formatter if possible
task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
end

CLEAN.include 'test/tmp'
Expand Down

0 comments on commit 7ef8afb

Please sign in to comment.