.rubocop.yml in digicert-0.2.0 vs .rubocop.yml in digicert-0.3.0
- old
+ new
@@ -1,12 +1,15 @@
AllCops:
- TargetRubyVersion: 2.3
+ Include:
+ - "**/*.rake"
+ - "**/Gemfile"
+ - "**/Rakefile"
Exclude:
- db/schema.rb
-Style/AccessorMethodName:
+Naming/AccessorMethodName:
Description: Check the naming of accessor methods for get_/set_.
Enabled: false
Style/Alias:
Description: 'Use alias_method instead of alias.'
@@ -21,11 +24,11 @@
Style/AsciiComments:
Description: 'Use only ascii symbols in comments.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-comments'
Enabled: false
-Style/AsciiIdentifiers:
+Naming/AsciiIdentifiers:
Description: 'Use only ascii symbols in identifiers.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#english-identifiers'
Enabled: false
Style/Attr:
@@ -90,34 +93,36 @@
Description: >-
A calculated magnitude based on number of assignments,
branches, and conditions.
Enabled: false
+Metrics/BlockLength:
+ CountComments: true # count full line comments?
+ Max: 25
+ ExcludedMethods: []
+ Exclude:
+ - "spec/**/*"
+
Metrics/CyclomaticComplexity:
Description: >-
A complexity metric that is strongly correlated to the number
of test cases needed to validate a method.
Enabled: false
Rails/Delegate:
Description: 'Prefer delegate method for delegations.'
Enabled: false
-Style/DeprecatedHashMethods:
- Description: 'Checks for use of deprecated Hash methods.'
- StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#hash-key'
+Style/PreferredHashMethods:
+ Description: 'Checks use of `has_key?` and `has_value?` Hash methods.'
+ StyleGuide: '#hash-key'
Enabled: false
Style/Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false
-Style/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'
- EnforcedStyle: trailing
-
Style/DoubleNegation:
Description: 'Checks for uses of double negation (!!).'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-bang-bang'
Enabled: false
@@ -139,19 +144,21 @@
Style/EvenOdd:
Description: 'Favor the use of Fixnum#even? && Fixnum#odd?'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#predicate-methods'
Enabled: false
-Style/ExtraSpacing:
- Description: 'Do not use unnecessary spacing.'
- Enabled: true
-
-Style/FileName:
+Naming/FileName:
Description: 'Use snake_case for source file names.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#snake-case-files'
Enabled: 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/FlipFlop:
Description: 'Checks for flip flops'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-flip-flops'
Enabled: false
@@ -216,29 +223,15 @@
Style/ModuleFunction:
Description: 'Checks for usage of `extend self` in modules.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#module-function'
Enabled: false
-Style/MultilineOperationIndentation:
- Description: >-
- Checks indentation of binary operations that span more than
- one line.
- Enabled: true
- EnforcedStyle: indented
-
Style/MultilineBlockChain:
Description: 'Avoid multi-line chains of blocks.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#single-line-blocks'
Enabled: false
-Style/MultilineMethodCallIndentation:
- Description: >-
- Checks indentation of method calls with the dot operator
- that span more than one line.
- Enabled: true
- EnforcedStyle: indented
-
Style/NegatedIf:
Description: >-
Favor unless over if for negative conditions
(or control flow or).
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#unless-for-negatives'
@@ -276,11 +269,11 @@
Favor the ternary operator(?:) over
if/then/else/end constructs.
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#ternary-operator'
Enabled: false
-Style/OpMethod:
+Naming/BinaryOperatorParameterName:
Description: 'When defining binary operators, name the argument other.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#other-arg'
Enabled: false
Metrics/ParameterLists:
@@ -296,11 +289,11 @@
Style/PerlBackrefs:
Description: 'Avoid Perl-style regex back references.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-perl-regexp-last-matchers'
Enabled: false
-Style/PredicateName:
+Naming/PredicateName:
Description: 'Check the names of predicate methods.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#bool-methods-qmark'
NamePrefixBlacklist:
- is_
Exclude:
@@ -351,32 +344,26 @@
Style/StringLiterals:
Description: 'Checks if uses of quotes match the configured preference.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#consistent-string-literals'
EnforcedStyle: double_quotes
Enabled: true
- SupportedStyles:
- - single_quotes
- - double_quotes
-Style/FrozenStringLiteralComment:
- Enabled: false
-
Style/TrailingCommaInArguments:
Description: 'Checks for trailing comma in argument lists.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
EnforcedStyleForMultiline: comma
- SupportedStyles:
+ SupportedStylesForMultiline:
- comma
- consistent_comma
- no_comma
Enabled: true
Style/TrailingCommaInLiteral:
Description: 'Checks for trailing comma in array and hash literals.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-trailing-array-commas'
EnforcedStyleForMultiline: comma
- SupportedStyles:
+ SupportedStylesForMultiline:
- comma
- consistent_comma
- no_comma
Enabled: true
@@ -407,10 +394,45 @@
Style/WordArray:
Description: 'Use %w or %W for arrays of words.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#percent-w'
Enabled: false
+# Layout
+
+Layout/AlignParameters:
+ Description: 'Here we check if the parameters on a multi-line method call or definition are aligned.'
+ StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#no-double-indent'
+ Enabled: false
+
+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'
+ EnforcedStyle: trailing
+
+Layout/ExtraSpacing:
+ Description: 'Do not use unnecessary spacing.'
+ Enabled: true
+
+Layout/MultilineOperationIndentation:
+ Description: >-
+ Checks indentation of binary operations that span more than
+ one line.
+ Enabled: true
+ EnforcedStyle: indented
+
+Layout/MultilineMethodCallIndentation:
+ Description: >-
+ Checks indentation of method calls with the dot operator
+ that span more than one line.
+ Enabled: true
+ EnforcedStyle: indented
+
+Layout/InitialIndentation:
+ Description: >-
+ Checks the indentation of the first non-blank non-comment line in a file.
+ Enabled: false
+
# Lint
Lint/AmbiguousOperator:
Description: >-
Checks for ambiguous operators in the first argument of a
@@ -461,20 +483,9 @@
Enabled: false
Lint/HandleExceptions:
Description: "Don't suppress exception."
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#dont-hide-exceptions'
- Enabled: false
-
-Lint/InvalidCharacterLiteral:
- Description: >-
- Checks for invalid character literals with a non-escaped
- whitespace character.
- Enabled: false
-
-Style/InitialIndentation:
- Description: >-
- Checks the indentation of the first non-blank non-comment line in a file.
Enabled: false
Lint/LiteralInCondition:
Description: 'Checks of literals used in conditions.'
Enabled: false