Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
172 changes: 14 additions & 158 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,13 @@ AllCops:
- 'tmp/**/*'
- 'vendor/**/*'
TargetRubyVersion: 2.6
TargetRailsVersion: 5.2
TargetRailsVersion: 6.0
UseCache: true
DisabledByDefault: true

Rails:
Enabled: true

Metrics/AbcSize:
Description: A calculated magnitude based on number of assignments, branches, and
conditions.
Enabled: false
Max: 15
Exclude:
- spec/**/*

Metrics/CyclomaticComplexity:
Enabled: false

Metrics/BlockLength:
CountComments: false # count full line comments?
Enabled: true
Expand All @@ -45,12 +35,6 @@ Metrics/BlockLength:
- 'config/routes.rb'
- 'spec/**/*.rb'

Metrics/ClassLength:
Description: Avoid classes longer than 100 lines of code.
Enabled: false
CountComments: false
Max: 100

Layout/LineLength:
Description: Limit lines to 100 characters.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#80-character-limits
Expand All @@ -63,16 +47,6 @@ Layout/LineLength:
Exclude:
- 'config/routes.rb'

Metrics/MethodLength:
Description: Avoid methods longer than 15 lines of code.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#short-methods
Enabled: false
CountComments: false
Max: 15
Exclude:
- 'db/migrate/*'
- spec/**/*

Metrics/ModuleLength:
CountComments: false
Max: 200
Expand All @@ -91,6 +65,9 @@ Naming/VariableName:
Rails/FilePath:
Enabled: false

Rails/ApplicationMailer:
Enabled: false

Rails/HttpPositionalArguments:
Description: 'Use keyword arguments instead of positional arguments in http method calls.'
Enabled: true
Expand Down Expand Up @@ -148,13 +125,6 @@ Style/AndOr:
- always
- conditionals

Style/Documentation:
Description: Document classes and non-namespace modules.
Enabled: false
Exclude:
- 'spec/**/*'
- 'test/**/*'

Layout/DotPosition:
Description: Checks the position of the dot in multi-line method calls.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#consistent-multi-line-chains
Expand All @@ -163,9 +133,6 @@ Layout/DotPosition:
- leading
- trailing

Style/DoubleNegation:
Enabled: false

# Warn on empty else statements
# empty - warn only on empty else
# nil - warn on else with nil in it
Expand All @@ -185,12 +152,6 @@ Layout/ExtraSpacing:
# When true, forces the alignment of = in assignments on consecutive lines.
ForceEqualSignAlignment: false

Style/FrozenStringLiteralComment:
Description: >-
Add the frozen_string_literal comment to the top of files
to help transition from Ruby 2.3.0 to Ruby 3.0.
Enabled: false

Style/IfUnlessModifier:
Description: Favor modifier if/unless usage when you have a single-line body.
StyleGuide: https://github.com/bbatsov/ruby-style-guide#if-as-a-modifier
Expand Down Expand Up @@ -248,9 +209,6 @@ Style/StringLiterals:
- double_quotes
ConsistentQuotesInMultiline: true

Style/RegexpLiteral:
Enabled: false

Style/TrailingCommaInArguments:
# If `comma`, the cop requires a comma after the last argument, but only for
# parenthesized method calls where each argument is on its own line.
Expand Down Expand Up @@ -287,42 +245,6 @@ Style/TrailingCommaInHashLiteral:
Naming/MethodParameterName:
MinNameLength: 2

Style/ExpandPathArguments:
Enabled: false

Style/FormatStringToken:
Enabled: false

Style/SingleLineBlockParams:
Enabled: false

Layout/EmptyLineAfterGuardClause:
Enabled: false

Naming/MemoizedInstanceVariableName:
Enabled: false

Naming/RescuedExceptionsVariableName:
Enabled: false

Style/HashEachMethods:
Enabled: false

Style/HashTransformKeys:
Enabled: false

Style/HashTransformValues:
Enabled: false

Lint/SuppressedException:
Enabled: false

Lint/SendWithMixinArgument:
Enabled: false

Layout/EmptyLinesAroundAttributeAccessor:
Enabled: false

Layout/SpaceAroundMethodCallOperator:
Enabled: true

Expand All @@ -335,24 +257,9 @@ Lint/MixedRegexpCaptureTypes:
Lint/RaiseException:
Enabled: true

Lint/StructNewOverride:
Enabled: false

Style/ExponentialNotation:
Enabled: false

Style/RedundantRegexpCharacterClass:
Enabled: true

Style/RedundantRegexpEscape:
Enabled: false

Style/SlicingWithRange:
Enabled: false

Rails/ApplicationMailer:
Enabled: false

Lint/BinaryOperatorWithIdenticalOperands:
Enabled: true

Expand All @@ -365,9 +272,6 @@ Lint/DuplicateRescueException:
Lint/FloatComparison:
Enabled: true

Lint/MissingSuper:
Enabled: false

Lint/OutOfRangeRegexpRef:
Enabled: true

Expand All @@ -386,9 +290,6 @@ Lint/SelfAssignment:
Lint/TopLevelReturnWithArgument:
Enabled: true

Style/GlobalStdStream:
Enabled: false

Style/RedundantAssignment:
Enabled: true

Expand All @@ -398,42 +299,6 @@ Style/RedundantFetchBlock:
Style/RedundantFileExtensionInRequire:
Enabled: true

Lint/EmptyConditionalBody:
Enabled: false

Lint/UnreachableLoop:
Enabled: false

Style/AccessorGrouping:
Enabled: false

Style/ArrayCoercion:
Enabled: false

Style/BisectedAttrAccessor:
Enabled: false

Style/CaseLikeIf:
Enabled: false

Style/ExplicitBlockArgument:
Enabled: false

Style/HashAsLastArrayItem:
Enabled: false

Style/HashLikeCase:
Enabled: false

Style/OptionalBooleanParameter:
Enabled: false

Style/SingleArgumentDig:
Enabled: false

Style/StringConcatenation:
Enabled: false

Style/MultilineWhenThen:
Enabled: true

Expand All @@ -446,30 +311,12 @@ Lint/DuplicateRequire:
Lint/TrailingCommaInAttributeDeclaration:
Enabled: true

Lint/EmptyFile:
Enabled: false

Lint/UselessMethodDefinition:
Enabled: false

Style/CombinableLoops:
Enabled: false

Style/RedundantSelfAssignment:
Enabled: false

Style/SoleNestedConditional:
Enabled: false

Lint/UselessTimes:
Enabled: true

Layout/BeginEndAlignment:
Enabled: true

Lint/ConstantDefinitionInBlock:
Enabled: false

Lint/IdentityComparison:
Enabled: true

Expand All @@ -478,3 +325,12 @@ Bundler/DuplicatedGem:

Naming/BinaryOperatorParameterName:
Enabled: true

Lint/DuplicateRegexpCharacterClassElement:
Enabled: true

Style/ArgumentsForwarding:
Enabled: true

Style/NilLambda:
Enabled: true
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ group :development, :test do
gem 'psych'
gem 'puma'
gem 'rspec-rails', '~> 4.0'
gem 'rubocop', '~> 0.91.0', require: false
gem 'rubocop', '~> 1.4.0', require: false
gem 'rubocop-rails', '>= 2.5.2', require: false
end

Expand Down
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -546,17 +546,17 @@ GEM
rspec-mocks (~> 3.9)
rspec-support (~> 3.9)
rspec-support (3.10.0)
rubocop (0.91.0)
rubocop (1.4.2)
parallel (~> 1.10)
parser (>= 2.7.1.1)
parser (>= 2.7.1.5)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
regexp_parser (>= 1.8)
rexml
rubocop-ast (>= 0.4.0, < 1.0)
rubocop-ast (>= 1.1.1)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.4.1)
parser (>= 2.7.1.4)
rubocop-ast (1.3.0)
parser (>= 2.7.1.5)
rubocop-rails (2.5.2)
activesupport
rack (>= 1.1)
Expand Down Expand Up @@ -767,7 +767,7 @@ DEPENDENCIES
rotp (~> 6.1)
rqrcode
rspec-rails (~> 4.0)
rubocop (~> 0.91.0)
rubocop (~> 1.4.0)
rubocop-rails (>= 2.5.2)
ruby-progressbar
ruby-saml
Expand Down