From 7ef8afb96719881d24954b07ead25bf55eeb7ba9 Mon Sep 17 00:00:00 2001 From: archanaserver Date: Fri, 4 Aug 2023 15:55:29 +0530 Subject: [PATCH] Improve RuboCop configuration with GitHub Actions integration Added RuboCop configurations to enhance code quality checks and integrated GitHub Actions formatter for improved code review experience in pull requests. --- Rakefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index 4e60401b..8148d7a4 100644 --- a/Rakefile +++ b/Rakefile @@ -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'