Skip to content

Commit

Permalink
Upgrade Rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
denisdefreyne committed Dec 31, 2020
1 parent 46e947c commit 37c2e83
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 2 deletions.
41 changes: 40 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
inherit_from: .rubocop_todo.yml

Layout/SpaceBeforeBrackets: # (new in 1.7)
Enabled: true
Lint/AmbiguousAssignment: # (new in 1.7)
Enabled: true
Lint/DuplicateBranch: # (new in 1.3)
Enabled: true
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
Enabled: true
Lint/EmptyBlock: # (new in 1.1)
Enabled: true
Lint/EmptyClass: # (new in 1.3)
Enabled: true
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
Enabled: true
Lint/ToEnumArguments: # (new in 1.1)
Enabled: true
Lint/UnexpectedBlockArity: # (new in 1.5)
Enabled: true
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
Enabled: true
Style/ArgumentsForwarding: # (new in 1.1)
Enabled: true
Style/CollectionCompact: # (new in 1.2)
Enabled: true
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
Enabled: true
Style/HashExcept: # (new in 1.7)
Enabled: true
Style/NegatedIfElseCondition: # (new in 1.2)
Enabled: true
Style/NilLambda: # (new in 1.3)
Enabled: true
Style/RedundantArgument: # (new in 1.4)
Enabled: true
Style/SwapValues: # (new in 1.1)
Enabled: true

AllCops:
TargetRubyVersion: 2.5
DisplayCopNames: true
Expand Down Expand Up @@ -52,7 +91,7 @@ Metrics/ClassLength:
Metrics/CyclomaticComplexity:
Enabled: false

Metrics/LineLength:
Layout/LineLength:
Enabled: false

Metrics/MethodLength:
Expand Down
43 changes: 43 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This configuration was generated by
# `rubocop --auto-gen-config --exclude-limit 300`
# on 2020-12-31 10:05:59 UTC using RuboCop version 1.7.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: 5
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'adsf-live/test/test_watcher.rb'
- 'adsf/test/test_server.rb'

# Offense count: 1
# Configuration parameters: IgnoredPatterns.
# IgnoredPatterns: (?-mix:(exactly|at_least|at_most)\(\d+\)\.times)
Lint/UnreachableLoop:
Exclude:
- 'adsf/test/test_server.rb'

# Offense count: 1
# Cop supports --auto-correct.
Lint/UselessTimes:
Exclude:
- 'adsf-live/test/test_watcher.rb'

# Offense count: 3
# Cop supports --auto-correct.
Style/ExplicitBlockArgument:
Exclude:
- 'Rakefile'
- 'adsf/test/test_server.rb'

# Offense count: 6
# Cop supports --auto-correct.
Style/StringConcatenation:
Exclude:
- 'adsf-live/Rakefile'
- 'adsf/Rakefile'
- 'adsf/lib/adsf/rack/index_file_finder.rb'
- 'scripts/release'
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ group :development do
gem 'minitest'
gem 'rack-test'
gem 'rake'
gem 'rubocop', '~> 0.81.0'
gem 'rubocop', '~> 1.7'
gem 'webrick', '~> 1.7'
end

0 comments on commit 37c2e83

Please sign in to comment.