-
Notifications
You must be signed in to change notification settings - Fork 323
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update rubocop + start testing on Ruby 3.0 (#637)
* Cleanup GitHub Actions CI config * Update rubocop Split config into sections and generate new _todo file with excludes. * Add Ruby 3.0 support - Add ruby-3.0 to CI test matrix - Fix testsuite to support Ruby 3.0
- Loading branch information
Showing
31 changed files
with
373 additions
and
254 deletions.
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
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,127 +1,10 @@ | ||
require: rubocop-performance | ||
inherit_from: | ||
- .rubocop_todo.yml | ||
- .rubocop/layout.yml | ||
- .rubocop/style.yml | ||
|
||
AllCops: | ||
TargetRubyVersion: 2.3 | ||
DefaultFormatter: fuubar | ||
DisplayCopNames: true | ||
|
||
## Layout ###################################################################### | ||
|
||
Layout/AlignHash: | ||
EnforcedColonStyle: table | ||
EnforcedHashRocketStyle: table | ||
|
||
Layout/DotPosition: | ||
EnforcedStyle: trailing | ||
|
||
Layout/SpaceAroundOperators: | ||
AllowForAlignment: true | ||
|
||
Layout/SpaceInsideHashLiteralBraces: | ||
EnforcedStyle: no_space | ||
|
||
## Metrics ##################################################################### | ||
|
||
Metrics/AbcSize: | ||
Enabled: false | ||
|
||
Metrics/BlockLength: | ||
Exclude: | ||
- "spec/**/*" | ||
- "**/*.gemspec" | ||
|
||
Metrics/BlockNesting: | ||
Max: 2 | ||
|
||
Metrics/ClassLength: | ||
CountComments: false | ||
Max: 125 | ||
|
||
# TODO: Lower to 6 | ||
Metrics/CyclomaticComplexity: | ||
Max: 8 | ||
|
||
Metrics/PerceivedComplexity: | ||
Max: 8 | ||
|
||
# TODO: Lower to 80 | ||
Metrics/LineLength: | ||
AllowURI: true | ||
Max: 143 | ||
|
||
# TODO: Lower to 15 | ||
Metrics/MethodLength: | ||
CountComments: false | ||
Max: 25 | ||
|
||
Metrics/ModuleLength: | ||
CountComments: false | ||
Max: 120 | ||
|
||
Metrics/ParameterLists: | ||
Max: 5 | ||
CountKeywordArgs: true | ||
|
||
## Performance ################################################################# | ||
|
||
# XXX: requires ruby 2.4+ | ||
Performance/RegexpMatch: | ||
Enabled: false | ||
|
||
Performance/UnfreezeString: | ||
Enabled: false | ||
|
||
## Style ####################################################################### | ||
|
||
Style/CollectionMethods: | ||
PreferredMethods: | ||
collect: 'map' | ||
reduce: 'inject' | ||
find: 'detect' | ||
find_all: 'select' | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/DoubleNegation: | ||
Enabled: false | ||
|
||
Style/EachWithObject: | ||
Enabled: false | ||
|
||
Style/Encoding: | ||
Enabled: false | ||
|
||
Style/EmptyCaseCondition: | ||
Enabled: false | ||
|
||
# XXX: Lots of times it suggests making code terrible to read. | ||
Style/GuardClause: | ||
Enabled: false | ||
|
||
Style/HashSyntax: | ||
EnforcedStyle: hash_rockets | ||
|
||
Style/Lambda: | ||
Enabled: false | ||
|
||
Style/OptionHash: | ||
Enabled: true | ||
|
||
# XXX: requires ruby 2.3+ | ||
Style/SafeNavigation: | ||
Enabled: false | ||
|
||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/TrivialAccessors: | ||
Enabled: false | ||
|
||
Style/YodaCondition: | ||
Enabled: false | ||
|
||
Style/FormatStringToken: | ||
EnforcedStyle: unannotated | ||
|
||
Style/RescueStandardError: | ||
EnforcedStyle: implicit | ||
NewCops: enable | ||
TargetRubyVersion: 2.4 |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Layout/DotPosition: | ||
Enabled: true | ||
EnforcedStyle: leading | ||
|
||
Layout/HashAlignment: | ||
Enabled: true | ||
EnforcedColonStyle: table | ||
EnforcedHashRocketStyle: table |
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/DocumentDynamicEvalDefinition: | ||
Enabled: true | ||
Exclude: | ||
- 'spec/**/*.rb' | ||
|
||
Style/FormatStringToken: | ||
Enabled: true | ||
EnforcedStyle: unannotated | ||
|
||
Style/HashSyntax: | ||
Enabled: true | ||
EnforcedStyle: hash_rockets | ||
|
||
Style/OptionHash: | ||
Enabled: true | ||
|
||
Style/RescueStandardError: | ||
Enabled: true | ||
EnforcedStyle: implicit | ||
|
||
Style/StringLiterals: | ||
Enabled: true | ||
EnforcedStyle: double_quotes | ||
|
||
Style/WordArray: | ||
Enabled: true | ||
|
||
Style/YodaCondition: | ||
Enabled: false |
Oops, something went wrong.