From 8c1d561b94b1b19d08286afac82409ac697ab31b Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 12 May 2021 11:16:44 +0100 Subject: [PATCH] Add rubocop-rake This checks the coding standards in our rake files. --- .rubocop.yml | 1 + .rubocop_todo.yml | 15 +++++++++++++++ Gemfile | 1 + Gemfile.lock | 3 +++ 4 files changed, 20 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index 9b7a28d87..1931eb55f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,6 +4,7 @@ require: - rubocop-minitest - rubocop-performance - rubocop-rails + - rubocop-rake AllCops: TargetRubyVersion: 2.5 diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 5833a6e35..f49440e81 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -12,6 +12,7 @@ require: - rubocop-minitest - rubocop-performance - rubocop-rails + - rubocop-rake # Offense count: 544 # Cop supports --auto-correct. @@ -168,6 +169,20 @@ Rails/OutputSafety: Rails/TimeZone: Enabled: false +# Offense count: 8 +Rake/Desc: + Exclude: + - 'lib/tasks/auto_annotate_models.rake' + - 'lib/tasks/eslint.rake' + - 'lib/tasks/subscribe_diary_authors.rake' + - 'lib/tasks/subscribe_old_changesets.rake' + - 'lib/tasks/testing.rake' + +# Offense count: 3 +Rake/MethodDefinitionInTask: + Exclude: + - 'lib/tasks/eslint.rake' + # Offense count: 558 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. diff --git a/Gemfile b/Gemfile index 9568ea5f8..69a97f370 100644 --- a/Gemfile +++ b/Gemfile @@ -142,6 +142,7 @@ group :test do gem "rubocop-minitest" gem "rubocop-performance" gem "rubocop-rails" + gem "rubocop-rake" gem "selenium-webdriver" gem "simplecov", :require => false gem "simplecov-lcov", :require => false diff --git a/Gemfile.lock b/Gemfile.lock index 6a579fd20..fb345ac72 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -408,6 +408,8 @@ GEM activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.7.0, < 2.0) + rubocop-rake (0.5.1) + rubocop ruby-openid (2.9.2) ruby-progressbar (1.11.0) ruby2_keywords (0.0.4) @@ -540,6 +542,7 @@ DEPENDENCIES rubocop-minitest rubocop-performance rubocop-rails + rubocop-rake sanitize sassc-rails secure_headers -- 2.39.5