-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update RuboCop to 0.50.x #752
Merged
+402
−348
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
36b037d
Bump RuboCop
tamird f389e18
Fix Lint/RescueWithoutErrorClass
tamird 54c20a6
Style/ConditionalAssignment
tamird 72f50f3
Layout/IndentHeredoc
tamird e864fd6
Layout/EmptyLineAfterMagicComment
tamird 9ff6a03
Layout/SpaceInsidePercentLiteralDelimiters
tamird e6cc0a1
Lint/AmbiguousBlockAssociation
tamird d0d8d06
Lint/UnifiedInteger
tamird 5272b3d
Naming/HeredocDelimiterCase
tamird 13dfc46
Performance/HashEachMethods
tamird b63cb77
Performance/RedundantMerge
tamird c90c471
Performance/TimesMap
tamird 9d9d02d
Style/Alias
tamird 1e2b3ab
Style/BlockDelimiters
tamird 972585e
Style/Encoding
tamird 03b2587
Style/GuardClause
tamird ac81a7c
Style/HashSyntax
tamird 0e77b9b
Style/IfInsideElse
tamird 3f4187e
Style/MutableConstant
tamird 6a4d443
Style/NumericPredicate
tamird b38d0c8
Style/PercentLiteralDelimiters
tamird d89f241
Style/SignalException
tamird File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,35 @@ | ||
inherit_from: .rubocop_todo.yml | ||
|
||
AllCops: | ||
TargetRubyVersion: 1.9 | ||
|
||
DisplayCopNames: true | ||
Exclude: | ||
- 'pkg/**/*' | ||
- 'tmp/**/*' | ||
- 'vendor/**/*' | ||
|
||
Layout/CaseIndentation: | ||
EnforcedStyle: end | ||
|
||
Layout/IndentHash: | ||
EnforcedStyle: consistent | ||
|
||
Layout/IndentHeredoc: | ||
EnforcedStyle: powerpack | ||
|
||
Lint/EndAlignment: | ||
AlignWith: variable | ||
EnforcedStyleAlignWith: variable | ||
|
||
Style/CaseIndentation: | ||
IndentWhenRelativeTo: end | ||
Style/Encoding: | ||
AutoCorrectEncodingComment: '# encoding: UTF-8' | ||
EnforcedStyle: always | ||
|
||
Style/IndentHash: | ||
EnforcedStyle: consistent | ||
Style/TrailingCommaInArguments: | ||
EnforcedStyleForMultiline: consistent_comma | ||
|
||
Style/TrailingComma: | ||
Style/TrailingCommaInLiteral: | ||
EnforcedStyleForMultiline: consistent_comma | ||
|
||
Style/TrivialAccessors: | ||
AllowPredicates: true | ||
|
||
# TODO: remove when we end support for < 1.9.3 | ||
|
||
Style/HashSyntax: | ||
EnforcedStyle: hash_rockets | ||
|
||
Style/Lambda: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,86 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2015-09-06 13:16:09 -0400 using RuboCop version 0.34.0. | ||
# on 2017-11-25 19:54:28 -0500 using RuboCop version 0.50.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: 2 | ||
Metrics/AbcSize: | ||
Max: 93 | ||
Max: 90 | ||
|
||
# Offense count: 31 | ||
# Configuration parameters: CountComments, ExcludedMethods. | ||
Metrics/BlockLength: | ||
Max: 825 | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: CountBlocks. | ||
Metrics/BlockNesting: | ||
Max: 5 | ||
|
||
# Offense count: 1 | ||
# Configuration parameters: CountComments. | ||
Metrics/ClassLength: | ||
Max: 125 | ||
|
||
# Offense count: 2 | ||
# Offense count: 3 | ||
Metrics/CyclomaticComplexity: | ||
Max: 30 | ||
|
||
# Offense count: 290 | ||
# Configuration parameters: AllowURI, URISchemes. | ||
# Offense count: 313 | ||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. | ||
# URISchemes: http, https | ||
Metrics/LineLength: | ||
Max: 232 | ||
|
||
# Offense count: 5 | ||
# Offense count: 6 | ||
# Configuration parameters: CountComments. | ||
Metrics/MethodLength: | ||
Max: 60 | ||
Max: 57 | ||
|
||
# Offense count: 1 | ||
# Offense count: 2 | ||
Metrics/PerceivedComplexity: | ||
Max: 27 | ||
|
||
# Offense count: 40 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods. | ||
Style/BlockDelimiters: | ||
Enabled: false | ||
# Offense count: 3 | ||
# Configuration parameters: Blacklist. | ||
# Blacklist: END, (?-mix:EO[A-Z]{1}) | ||
Naming/HeredocDelimiterNaming: | ||
Exclude: | ||
- 'tasks/compile.rake' | ||
|
||
# Offense count: 12 | ||
# Offense count: 10 | ||
Style/Documentation: | ||
Exclude: | ||
- 'spec/**/*' | ||
- 'test/**/*' | ||
- 'benchmark/active_record.rb' | ||
- 'benchmark/allocations.rb' | ||
- 'benchmark/query_with_mysql_casting.rb' | ||
- 'lib/mysql2.rb' | ||
- 'lib/mysql2/client.rb' | ||
- 'lib/mysql2/em.rb' | ||
- 'lib/mysql2/error.rb' | ||
- 'lib/mysql2/field.rb' | ||
- 'lib/mysql2/result.rb' | ||
- 'lib/mysql2/statement.rb' | ||
- 'lib/mysql2/version.rb' | ||
|
||
# Offense count: 9 | ||
# Offense count: 14 | ||
# Configuration parameters: AllowedVariables. | ||
Style/GlobalVars: | ||
Exclude: | ||
- 'ext/mysql2/extconf.rb' | ||
|
||
# Offense count: 14 | ||
# Offense count: 17 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: Strict. | ||
Style/NumericLiterals: | ||
MinDigits: 20 | ||
|
||
# Offense count: 680 | ||
# Offense count: 726 | ||
# Cop supports --auto-correct. | ||
# Configuration parameters: EnforcedStyle, SupportedStyles. | ||
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline. | ||
# SupportedStyles: single_quotes, double_quotes | ||
Style/StringLiterals: | ||
Enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# encoding: UTF-8 | ||
|
||
$LOAD_PATH.unshift File.expand_path(File.dirname(__FILE__) + '/../lib') | ||
|
||
require 'rubygems' | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh nice, it stopped crashing on recent Rubinius?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't actually tested that yet (I'm about to), but Rubinius support looks to have been removed some time ago (1df20eb).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubinius is in a bit of a rough state it seems:
rubygems/bundler#6163
rubinius/rubinius#3769
I'll check again when either of those issues is fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, true - Rubinius was in rough shape, and even as an allowed failure in Travis, was just gumming up the works to try to keep up.