Inherit rubocop off discourse

Inherit rubocop off discourse
From e5c6553f9641e3b4339b6faebbdb6e614facdf3d Mon Sep 17 00:00:00 2001
From: Sam <sam.saffron@gmail.com>
Date: Thu, 6 Dec 2018 16:16:12 +1100
Subject: [PATCH] Inherit rubocop off discourse


diff --git a/.gitignore b/.gitignore
index f61f58b..c77f8cf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@ test/tmp
 test/version_tmp
 tmp
 *.swp
+.rubocop-https---raw-githubusercontent-com-discourse-discourse-master--rubocop-yml
diff --git a/.rubocop.yml b/.rubocop.yml
index a0c6e56..0ca7eff 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,25 +1 @@
-inherit_from: .rubocop_todo.yml
-
-AllCops:
-  TargetRubyVersion: 2.4
-  DisabledByDefault: false
-
-# Align `end` with the matching keyword or starting expression except for
-# assignments, where it should be aligned with the LHS.
-Layout/EndAlignment:
-  EnforcedStyleAlignWith: variable
-
-Layout/MultilineMethodCallIndentation:
-  EnforcedStyle: indented
-
-Bundler/OrderedGems:
-  Enabled: false
-
-# Redis backend is quite big
-Metrics/ClassLength:
-  Max: 310
-
-Metrics/BlockLength:
-  Exclude:
-    - '**/spec_helper.rb'
-    - '**/**_spec.rb'
+inherit_from: https://raw.githubusercontent.com/discourse/discourse/master/.rubocop.yml
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
deleted file mode 100644
index d87d849..0000000
--- a/.rubocop_todo.yml
+++ /dev/null
@@ -1,657 +0,0 @@
-# This configuration was generated by
-# `rubocop --auto-gen-config`
-# on 2018-12-03 15:33:57 +0000 using RuboCop version 0.60.0.
-# The point is for the user to remove these configuration records
-# one by one as the offenses are removed from the code base.
-# Note that changes in the inspected code, or installation of new
-# versions of RuboCop, may require this file to be generated again.
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
-# Include: **/*.gemspec
-Gemspec/OrderedDependencies:
-  Exclude:
-    - 'message_bus.gemspec'
-
-# Offense count: 1
-# Configuration parameters: Include.
-# Include: **/*.gemspec
-Gemspec/RequiredRubyVersion:
-  Exclude:
-    - 'message_bus.gemspec'
-
-# Offense count: 15
-# Configuration parameters: AllowSafeAssignment.
-Lint/AssignmentInCondition:
-  Exclude:
-    - 'examples/chat/chat.rb'
-    - 'lib/message_bus.rb'
-    - 'lib/message_bus/backends/memory.rb'
-    - 'lib/message_bus/backends/postgres.rb'
-    - 'lib/message_bus/rack/middleware.rb'
-    - 'lib/message_bus/rack/thin_ext.rb'
-    - 'spec/lib/message_bus/client_spec.rb'
-    - 'spec/lib/message_bus_spec.rb'
-
-# Offense count: 5
-Lint/HandleExceptions:
-  Exclude:
-    - 'lib/message_bus/backends/postgres.rb'
-    - 'lib/message_bus/connection_manager.rb'
-    - 'lib/message_bus/diagnostics.rb'
-    - 'spec/lib/message_bus/multi_process_spec.rb'
-
-# Offense count: 1
-Lint/LiteralAsCondition:
-  Exclude:
-    - 'examples/chat/chat.rb'
-
-# Offense count: 3
-Lint/NonLocalExitFromIterator:
-  Exclude:
-    - 'lib/message_bus.rb'
-    - 'lib/message_bus/backends/postgres.rb'
-    - 'lib/message_bus/backends/redis.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Lint/OrderedMagicComments:
-  Exclude:
-    - 'message_bus.gemspec'
-
-# Offense count: 1
-Lint/RescueException:
-  Exclude:
-    - 'spec/lib/message_bus/multi_process_spec.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Lint/StringConversionInInterpolation:
-  Exclude:
-    - 'spec/lib/message_bus/multi_process_spec.rb'
-
-# Offense count: 30
-Metrics/AbcSize:
-  Max: 112
-
-# Offense count: 1
-# Configuration parameters: CountComments, ExcludedMethods.
-# ExcludedMethods: refine
-Metrics/BlockLength:
-  Max: 29
-
-# Offense count: 3
-# Configuration parameters: CountBlocks.
-Metrics/BlockNesting:
-  Max: 4
-
-# Offense count: 18
-Metrics/CyclomaticComplexity:
-  Max: 30
-
-# Offense count: 38
-# Configuration parameters: CountComments, ExcludedMethods.
-Metrics/MethodLength:
-  Max: 105
-
-# Offense count: 1
-# Configuration parameters: CountComments.
-Metrics/ModuleLength:
-  Max: 419
-
-# Offense count: 18
-Metrics/PerceivedComplexity:
-  Max: 34
-
-# Offense count: 1
-Naming/AccessorMethodName:
-  Exclude:
-    - 'lib/message_bus/diagnostics.rb'
-
-# Offense count: 2
-# Configuration parameters: EnforcedStyleForLeadingUnderscores.
-# SupportedStylesForLeadingUnderscores: disallowed, required, optional
-Naming/MemoizedInstanceVariableName:
-  Exclude:
-    - 'lib/message_bus.rb'
-    - 'spec/assets/support/jasmine_helper.rb'
-
-# Offense count: 2
-# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
-# NamePrefix: is_, has_, have_
-# NamePrefixBlacklist: is_, has_, have_
-# NameWhitelist: is_a?
-# MethodDefinitionMacros: define_method, define_singleton_method
-Naming/PredicateName:
-  Exclude:
-    - 'spec/**/*'
-    - 'lib/message_bus.rb'
-    - 'lib/message_bus/backends/redis.rb'
-
-# Offense count: 6
-# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
-# AllowedNames: io, id, to, by, on, in, at, ip, db
-Naming/UncommunicativeMethodParamName:
-  Exclude:
-    - 'lib/message_bus/backends/postgres.rb'
-    - 'lib/message_bus/connection_manager.rb'
-    - 'lib/message_bus/distributed_cache.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Performance/RedundantBlockCall:
-  Exclude:
-    - 'lib/message_bus/timer_thread.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: MaxKeyValuePairs.
-Performance/RedundantMerge:
-  Exclude:
-    - 'spec/spec_helper.rb'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-Performance/RegexpMatch:
-  Exclude:
-    - 'lib/message_bus/backends/redis.rb'
-    - 'lib/message_bus/rack/diagnostics.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-Performance/ReverseEach:
-  Exclude:
-    - 'spec/lib/message_bus/timer_thread_spec.rb'
-
-# Offense count: 2
-# Cop supports --auto-correct.
-# Configuration parameters: AutoCorrect.
-Performance/TimesMap:
-  Exclude:
-    - 'spec/lib/message_bus/connection_manager_spec.rb'
-
-# Offense count: 1
-Security/MarshalLoad:
-  Exclude:
-    - 'lib/message_bus/distributed_cache.rb'
-
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle.
-# SupportedStyles: prefer_alias, prefer_alias_method
-Style/Alias:
-  Exclude:
-    - 'lib/message_bus/rack/thin_ext.rb'
-
-# Offense count: 6
-# Cop supports --auto-correct.
-# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods.
-# SupportedStyles: line_count_based, semantic, braces_for_chaining
-# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
-# FunctionalMethods: let, let!, subject, watch
-# IgnoredMethods: lambda, proc, it
-Style/BlockDelimiters:
-  Exclude:
-    - 'spec/lib/fake_async_middleware.rb'
-    - 'spec/lib/message_bus/backend_spec.rb'
-    - 'spec/lib/message_bus/rack/middleware_spec.rb'
-    - 'spec/lib/message_bus/timer_thread_spec.rb'
-
-# Offense count: 7
-Style/CaseEquality:
-  Exclude:
-    - 'lib/message_bus/distributed_cache.rb'
-    - 'spec/lib/message_bus/rack/middleware_spec.rb'
-
-# Offense count: 16
-# Cop supports --auto-correct.
-# Configuration parameters: AutoCorrect, EnforcedStyle.
-# SupportedStyles: nested, compact
-Style/ClassAndModuleChildren:
-  Exclude:
-    - 'lib/message_bus.rb'
-    - 'lib/message_bus/client.rb'
-    - 'lib/message_bus/connection_manager.rb'
-    - 'lib/message_bus/diagnostics.rb'
-    - 'lib/message_bus/message.rb'
-    - 'lib/message_bus/rack/diagnostics.rb'
-    - 'lib/message_bus/rack/middleware.rb'
-    - 'lib/message_bus/rails/railtie.rb'
-    - 'lib/message_bus/timer_thread.rb'
-    - 'spec/assets/support/jasmine_helper.rb'
-
-# Offense count: 1
-Style/ClassVars:
-  Exclude:
-    - 'lib/message_bus/rack/diagnostics.rb'
-
-# Offense count: 3
-# Cop supports --auto-correct.
-# Configuration parameters: Keywords.

GitHub

2 Likes