From c5a49cc3c56283ae5f015c808327b1a29ca09ed9 Mon Sep 17 00:00:00 2001
From: Douwe Maan <douwe@selenight.nl>
Date: Tue, 21 Feb 2017 17:45:20 -0600
Subject: [PATCH] Disable some more cops

---
 .rubocop.yml      |  42 +++++++++++++++++++
 .rubocop_todo.yml | 104 ----------------------------------------------
 2 files changed, 42 insertions(+), 104 deletions(-)

diff --git a/.rubocop.yml b/.rubocop.yml
index 6151d6c570c..88264d046ae 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -874,6 +874,21 @@ RSpec/NestedGroups:
 RSpec/LeadingSubject:
   Enabled: false
 
+Lint/AmbiguousRegexpLiteral:
+  Enabled: false
+
+Bundler/OrderedGems:
+  Enabled: false
+
+Lint/HandleExceptions:
+  Enabled: false
+
+Lint/Loop:
+  Enabled: false
+
+Metrics/BlockLength:
+  Enabled: false
+
 RSpec/LetSetup:
   Enabled: false
 
@@ -888,3 +903,30 @@ RSpec/RepeatedDescription:
 
 RSpec/SubjectStub:
   Enabled: false
+Lint/ShadowingOuterLocalVariable:
+  Enabled: false
+
+Lint/AssignmentInCondition:
+  Enabled: false
+
+
+Lint/UnusedBlockArgument:
+  Enabled: false
+
+Rails/HttpPositionalArguments:
+  Enabled: false
+
+Rails/TimeZone:
+  Enabled: false
+
+Style/AlignParameters:
+  Enabled: false
+
+Style/CaseEquality:
+  Enabled: false
+
+Style/CommentAnnotation:
+  Enabled: false
+
+Style/DoubleNegation:
+  Enabled: false
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 085e593c6b9..29453cb4981 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -6,35 +6,6 @@
 # Note that changes in the inspected code, or installation of new
 # versions of RuboCop, may require this file to be generated again.
 
-# Offense count: 28
-# Configuration parameters: Include.
-# Include: **/Gemfile, **/gems.rb
-Bundler/OrderedGems:
-  Exclude:
-    - 'Gemfile'
-
-# Offense count: 176
-Lint/AmbiguousRegexpLiteral:
-  Enabled: false
-
-# Offense count: 54
-# Configuration parameters: AllowSafeAssignment.
-Lint/AssignmentInCondition:
-  Enabled: false
-
-# Offense count: 23
-Lint/HandleExceptions:
-  Enabled: false
-
-# Offense count: 1
-Lint/Loop:
-  Exclude:
-    - 'app/mailers/notify.rb'
-
-# Offense count: 32
-Lint/ShadowingOuterLocalVariable:
-  Enabled: false
-
 # Offense count: 10
 # Cop supports --auto-correct.
 Lint/UnifiedInteger:
@@ -62,17 +33,6 @@ Lint/UnneededSplatExpansion:
     - 'spec/support/seed_helper.rb'
     - 'spec/support/test_env.rb'
 
-# Offense count: 89
-# Cop supports --auto-correct.
-# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
-Lint/UnusedBlockArgument:
-  Enabled: false
-
-# Offense count: 114
-# Configuration parameters: CountComments.
-Metrics/BlockLength:
-  Max: 302
-
 # Offense count: 3
 # Cop supports --auto-correct.
 Performance/RedundantBlockCall:
@@ -136,24 +96,6 @@ RSpec/SingleArgumentMessageChain:
 Rails/DynamicFindBy:
   Enabled: false
 
-# Offense count: 1162
-# Cop supports --auto-correct.
-# Configuration parameters: Include.
-# Include: spec/**/*, test/**/*
-Rails/HttpPositionalArguments:
-  Enabled: false
-
-# Offense count: 56
-Rails/OutputSafety:
-  Enabled: false
-
-# Offense count: 202
-# Configuration parameters: EnforcedStyle, SupportedStyles.
-# SupportedStyles: strict, flexible
-Rails/TimeZone:
-  Enabled: false
-
-# Offense count: 16
 # Cop supports --auto-correct.
 # Configuration parameters: Include.
 # Include: app/models/**/*.rb
@@ -183,13 +125,6 @@ Security/JSONLoad:
     - 'spec/models/project_services/irker_service_spec.rb'
     - 'spec/support/stub_gitlab_calls.rb'
 
-# Offense count: 431
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
-# SupportedStyles: with_first_parameter, with_fixed_indentation
-Style/AlignParameters:
-  Enabled: false
-
 # Offense count: 55
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyle, SupportedStyles.
@@ -204,31 +139,11 @@ Style/BarePercentLiterals:
 Style/BracesAroundHashParameters:
   Enabled: false
 
-# Offense count: 7
-Style/CaseEquality:
-  Exclude:
-    - 'app/helpers/auth_helper.rb'
-    - 'app/helpers/builds_helper.rb'
-    - 'app/models/commit.rb'
-    - 'app/models/protected_branch.rb'
-    - 'app/services/projects/download_service.rb'
-    - 'config/initializers/trusted_proxies.rb'
-    - 'lib/gitlab/route_map.rb'
-
 # Offense count: 33
 # Cop supports --auto-correct.
 Style/ColonMethodCall:
   Enabled: false
 
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: Keywords.
-# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
-Style/CommentAnnotation:
-  Exclude:
-    - 'config/routes/user.rb'
-    - 'spec/requests/api/v3/project_snippets_spec.rb'
-
 # Offense count: 32
 # Cop supports --auto-correct.
 # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly.
@@ -236,25 +151,6 @@ Style/CommentAnnotation:
 Style/ConditionalAssignment:
   Enabled: false
 
-# Offense count: 21
-Style/DoubleNegation:
-  Exclude:
-    - 'app/controllers/users_controller.rb'
-    - 'app/models/commit.rb'
-    - 'app/models/merge_request.rb'
-    - 'app/models/project.rb'
-    - 'app/models/project_services/buildkite_service.rb'
-    - 'app/models/project_services/drone_ci_service.rb'
-    - 'app/models/project_wiki.rb'
-    - 'app/models/user.rb'
-    - 'config/initializers/6_validations.rb'
-    - 'lib/banzai/filter/abstract_reference_filter.rb'
-    - 'lib/banzai/filter/relative_link_filter.rb'
-    - 'lib/gitlab/git/diff_collection.rb'
-    - 'lib/gitlab/git/repository.rb'
-    - 'lib/gitlab/sherlock.rb'
-    - 'lib/gitlab/sherlock/middleware.rb'
-
 # Offense count: 6
 # Cop supports --auto-correct.
 Style/EachWithObject:
-- 
GitLab