Bump RuboCop to v0.84.x

Enable new Lint/DeprecatedOpenSSLConstant cop

Additionally:
  * Enable Layout/EmptyLinesAroundAttributeAccessor cop
  * Sort configuration by cop names alphabetically
  * Add a blank line to separate various departments
This commit is contained in:
Ashwin Maroli 2020-05-21 15:02:37 +05:30
parent 476ec0de9e
commit 5649cac7e7
2 changed files with 27 additions and 19 deletions

View File

@ -21,8 +21,13 @@ AllCops:
- script/**/* - script/**/*
- vendor/**/* - vendor/**/*
- tmp/**/* - tmp/**/*
Layout/EmptyLinesAroundAttributeAccessor:
Layout/EmptyComment:
Enabled: false Enabled: false
Layout/EmptyLinesAroundAttributeAccessor:
Enabled: true
Layout/EndAlignment:
Severity: error
Layout/HashAlignment: Layout/HashAlignment:
EnforcedHashRocketStyle: table EnforcedHashRocketStyle: table
Layout/IndentationWidth: Layout/IndentationWidth:
@ -31,18 +36,25 @@ Layout/FirstArrayElementIndentation:
EnforcedStyle: consistent EnforcedStyle: consistent
Layout/FirstHashElementIndentation: Layout/FirstHashElementIndentation:
EnforcedStyle: consistent EnforcedStyle: consistent
Layout/LineLength:
Exclude:
- !ruby/regexp /features\/.*.rb/
- Rakefile
- rake/*.rake
- Gemfile
Max: 100
Severity: warning
Layout/MultilineMethodCallIndentation: Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented EnforcedStyle: indented
Layout/MultilineOperationIndentation: Layout/MultilineOperationIndentation:
EnforcedStyle: indented EnforcedStyle: indented
Layout/SpaceAroundMethodCallOperator:
Enabled: true
Lint/NestedPercentLiteral: Lint/NestedPercentLiteral:
Exclude: Exclude:
- test/test_site.rb - test/test_site.rb
Layout/EmptyComment: Lint/DeprecatedOpenSSLConstant:
Enabled: false
Layout/EndAlignment:
Severity: error
Layout/SpaceAroundMethodCallOperator:
Enabled: true Enabled: true
Lint/RaiseException: Lint/RaiseException:
Enabled: true Enabled: true
@ -53,6 +65,7 @@ Lint/UnreachableCode:
Lint/Void: Lint/Void:
Exclude: Exclude:
- lib/jekyll/site.rb - lib/jekyll/site.rb
Metrics/AbcSize: Metrics/AbcSize:
Max: 21 Max: 21
Metrics/BlockLength: Metrics/BlockLength:
@ -73,14 +86,6 @@ Metrics/CyclomaticComplexity:
Exclude: Exclude:
- lib/jekyll/utils.rb - lib/jekyll/utils.rb
- lib/jekyll/commands/serve.rb - lib/jekyll/commands/serve.rb
Layout/LineLength:
Exclude:
- !ruby/regexp /features\/.*.rb/
- Rakefile
- rake/*.rake
- Gemfile
Max: 100
Severity: warning
Metrics/MethodLength: Metrics/MethodLength:
CountComments: false CountComments: false
Max: 20 Max: 20
@ -93,6 +98,7 @@ Metrics/ParameterLists:
Max: 4 Max: 4
Metrics/PerceivedComplexity: Metrics/PerceivedComplexity:
Max: 8 Max: 8
Naming/FileName: Naming/FileName:
Enabled: false Enabled: false
Naming/HeredocDelimiterNaming: Naming/HeredocDelimiterNaming:
@ -104,6 +110,7 @@ Naming/MemoizedInstanceVariableName:
- lib/jekyll/drops/site_drop.rb - lib/jekyll/drops/site_drop.rb
- lib/jekyll/drops/unified_payload_drop.rb - lib/jekyll/drops/unified_payload_drop.rb
- lib/jekyll/page_without_a_file.rb - lib/jekyll/page_without_a_file.rb
Security/MarshalLoad: Security/MarshalLoad:
Exclude: Exclude:
- !ruby/regexp /test\/.*.rb$/ - !ruby/regexp /test\/.*.rb$/
@ -112,6 +119,7 @@ Security/YAMLLoad:
Exclude: Exclude:
- !ruby/regexp /features\/.*.rb/ - !ruby/regexp /features\/.*.rb/
- !ruby/regexp /test\/.*.rb$/ - !ruby/regexp /test\/.*.rb$/
Style/AccessModifierDeclarations: Style/AccessModifierDeclarations:
Enabled: false Enabled: false
Style/Alias: Style/Alias:
@ -121,8 +129,6 @@ Style/AndOr:
Style/ClassAndModuleChildren: Style/ClassAndModuleChildren:
Exclude: Exclude:
- test/**/*.rb - test/**/*.rb
Style/FrozenStringLiteralComment:
EnforcedStyle: always
Style/Documentation: Style/Documentation:
Enabled: false Enabled: false
Style/DoubleNegation: Style/DoubleNegation:
@ -133,6 +139,8 @@ Style/FormatStringToken:
Exclude: Exclude:
- lib/jekyll/utils/ansi.rb - lib/jekyll/utils/ansi.rb
- lib/jekyll/liquid_renderer/table.rb - lib/jekyll/liquid_renderer/table.rb
Style/FrozenStringLiteralComment:
EnforcedStyle: always
Style/GuardClause: Style/GuardClause:
Enabled: false Enabled: false
Style/HashEachMethods: Style/HashEachMethods:
@ -167,10 +175,10 @@ Style/RescueModifier:
Style/SafeNavigation: Style/SafeNavigation:
Exclude: Exclude:
- lib/jekyll/document.rb - lib/jekyll/document.rb
Style/SlicingWithRange:
Enabled: false
Style/SignalException: Style/SignalException:
EnforcedStyle: only_raise EnforcedStyle: only_raise
Style/SlicingWithRange:
Enabled: false
Style/StringLiterals: Style/StringLiterals:
EnforcedStyle: double_quotes EnforcedStyle: double_quotes
Style/StringLiteralsInInterpolation: Style/StringLiteralsInInterpolation:

View File

@ -23,7 +23,7 @@ group :test do
gem "nokogiri", "~> 1.7" gem "nokogiri", "~> 1.7"
gem "rspec" gem "rspec"
gem "rspec-mocks" gem "rspec-mocks"
gem "rubocop", "~> 0.83.0" gem "rubocop", "~> 0.84.0"
gem "rubocop-performance" gem "rubocop-performance"
gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__) gem "test-dependency-theme", :path => File.expand_path("test/fixtures/test-dependency-theme", __dir__)
gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__) gem "test-theme", :path => File.expand_path("test/fixtures/test-theme", __dir__)