config/default.yml in silvercop-1.0.2 vs config/default.yml in silvercop-1.0.3

- old
+ new

@@ -1,10 +1,7 @@ -# This file was copied directly from https://github.com/rubocop-hq/rubocop/blob/v0.68.1/config/default.yml -# That means it has more configuration than it needs, but it's easier to copy and paste into new versions -# since we're just adopting everything in the new version. - # Common configuration. + AllCops: RubyInterpreters: - ruby - macruby - rake @@ -60,10 +57,11 @@ - '**/Thorfile' - '**/Vagabondfile' - '**/Vagrantfile' Exclude: - 'node_modules/**/*' + - 'tmp/**/*' - 'vendor/**/*' - '.git/**/*' # Default formatter will be used if no `-f/--format` option is given. DefaultFormatter: progress # Cop names are displayed in offense messages by default. Change behavior @@ -197,13 +195,14 @@ Description: 'Checks that `required_ruby_version` of gemspec and `TargetRubyVersion` of .rubocop.yml are equal.' Enabled: true VersionAdded: '0.52' Include: - '**/*.gemspec' - - + Gemspec/RubyVersionGlobalsUsage: Description: Checks usage of RUBY_VERSION in gemspec. + StyleGuide: '#no-ruby-version-in-the-gemspec' Enabled: true VersionAdded: '0.72' Include: - '**/*.gemspec' @@ -800,10 +799,33 @@ Description: Check for unnecessary blank lines at the beginning of a file. Enabled: true VersionAdded: '0.57' VersionChanged: '0.77' +Layout/LineLength: + Description: 'Limit lines to 80 characters.' + StyleGuide: '#80-character-limits' + Enabled: true + VersionAdded: '0.25' + VersionChanged: '0.78' + AutoCorrect: false + Max: 80 + # To make it possible to copy or click on URIs in the code, we allow lines + # containing a URI to be longer than Max. + AllowHeredoc: true + AllowURI: true + URISchemes: + - http + - https + # The IgnoreCopDirectives option causes the LineLength rule to ignore cop + # directives like '# rubocop: enable ...' when calculating a line's length. + IgnoreCopDirectives: true + # The IgnoredPatterns option is a list of !ruby/regexp and/or string + # elements. Strings will be converted to Regexp objects. A line that matches + # any regular expression listed in this option will be ignored by LineLength. + IgnoredPatterns: [] + Layout/MultilineArrayBraceLayout: Description: >- Checks that the closing brace in an array literal is either on the same line as the last array element, or a new line. @@ -1043,10 +1065,14 @@ VersionAdded: '0.49' # When `true`, allows most uses of extra spacing if the intent is to align # with an operator on the previous or next line, not counting empty lines # or comment lines. AllowForAlignment: true + EnforcedStyleForExponentOperator: no_space + SupportedStylesForExponentOperator: + - space + - no_space Layout/SpaceBeforeBlockBraces: Description: >- Checks that the left block brace has or doesn't have space before it. @@ -1472,10 +1498,16 @@ Do not omit the accumulator when calling `next` in a `reduce`/`inject` block. Enabled: true VersionAdded: '0.36' +Lint/NonDeterministicRequireOrder: + Description: 'Always sort arrays returned by Dir.glob when requiring files.' + Enabled: true + VersionAdded: '0.78' + Safe: false + Lint/NonLocalExitFromIterator: Description: 'Do not use return in iterator to cause non-local exit.' Enabled: true VersionAdded: '0.30' @@ -1809,32 +1841,9 @@ A complexity metric that is strongly correlated to the number of test cases needed to validate a method. Enabled: true VersionAdded: '0.25' Max: 6 - -Metrics/LineLength: - Description: 'Limit lines to 80 characters.' - StyleGuide: '#80-character-limits' - Enabled: true - VersionAdded: '0.25' - VersionChanged: '0.68' - AutoCorrect: false - Max: 80 - # To make it possible to copy or click on URIs in the code, we allow lines - # containing a URI to be longer than Max. - AllowHeredoc: true - AllowURI: true - URISchemes: - - http - - https - # The IgnoreCopDirectives option causes the LineLength rule to ignore cop - # directives like '# rubocop: enable ...' when calculating a line's length. - IgnoreCopDirectives: true - # The IgnoredPatterns option is a list of !ruby/regexp and/or string - # elements. Strings will be converted to Regexp objects. A line that matches - # any regular expression listed in this option will be ignored by LineLength. - IgnoredPatterns: [] Metrics/MethodLength: Description: 'Avoid methods longer than 10 lines of code.' StyleGuide: '#short-methods' Enabled: true