Skip to content

Add rubocop-rake as a development dependency

Peter Leitzen requested to merge pl-rubocop-rake into master

What does this MR do and why?

This MRs adds rubocop-rake as a development dependency.

As RuboCop detected the use of rake it suggested to use the RuboCop extension rubocop-rake.

This change does not affect projects using gitlab-styles because it only enables this extension in the development environment. Projects need to enable rubocop-rake if they want to use it.

Fixes #39 (closed)

RuboCop config diff

Done via rubocop --show-cops:

--- before	2023-01-16 14:09:08.180598335 +0100
+++ after	2023-01-16 14:09:00.852731562 +0100
@@ -1,4 +1,4 @@
-# Available cops (881) + config for /home/peter/devel/gitlab/gitlab-styles: 
+# Available cops (886) + config for /home/peter/devel/gitlab/gitlab-styles: 
 # Department 'Bundler' (6):
 Bundler/DuplicatedGem:
   Description: Checks for duplicate gem entries in Gemfile.
@@ -5416,6 +5416,35 @@
   Enabled: pending
   VersionAdded: '2.17'
 
+# Department 'Rake' (5):
+Rake/ClassDefinitionInTask:
+  Description: Do not define a class or module in rake task, because it will be defined
+    to the top level.
+  Enabled: true
+  VersionAdded: 0.3.0
+
+# Supports --autocorrect
+Rake/Desc:
+  Description: Describe the task with `desc` method.
+  Enabled: true
+  VersionAdded: 0.1.0
+
+Rake/DuplicateNamespace:
+  Description: Do not define namespace with the same name
+  Enabled: true
+  VersionAdded: 0.5.0
+
+Rake/DuplicateTask:
+  Description: Do not define tasks with the same name
+  Enabled: true
+  VersionAdded: 0.4.0
+
+Rake/MethodDefinitionInTask:
+  Description: Do not define a method in rake task, because it will be defined to the
+    top level.
+  Enabled: true
+  VersionAdded: 0.2.0
+
 # Department 'Security' (7):
 Security/CompoundHash:
   Description: When overwriting Object#hash to combine values, prefer delegating to
Edited by Peter Leitzen

Merge request reports

Loading