-
Notifications
You must be signed in to change notification settings - Fork 5
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 to latest rubocop gems; simplify rubocop.yml #58
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ require: | |
AllCops: | ||
DisplayCopNames: true | ||
DisplayStyleGuide: true | ||
NewCops: enable | ||
TargetRubyVersion: 2.4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought that this was also unnecessary... that it would default to whatever ruby version is run. See rubocop/rubocop#5610. Should we let the version autodetect instead? It's one fewer places to change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My understanding is that If I remove the |
||
Exclude: | ||
- "bin/*" | ||
|
@@ -21,37 +22,22 @@ AllCops: | |
Layout/CaseIndentation: | ||
Enabled: false | ||
|
||
Layout/EmptyLinesAroundAttributeAccessor: | ||
Enabled: true | ||
|
||
Layout/FirstArrayElementIndentation: | ||
EnforcedStyle: consistent | ||
|
||
Layout/HashAlignment: | ||
Enabled: false | ||
|
||
Layout/LineLength: | ||
Max: 120 | ||
Comment on lines
-33
to
-34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now the default for rubocop so we don't have to explicitly specify it. |
||
|
||
Layout/MultilineMethodCallIndentation: | ||
EnforcedStyle: indented | ||
|
||
Layout/SpaceAroundMethodCallOperator: | ||
Enabled: true | ||
|
||
Lint/AmbiguousBlockAssociation: | ||
Enabled: false | ||
|
||
Lint/RaiseException: | ||
Enabled: true | ||
|
||
Lint/ScriptPermission: | ||
Exclude: | ||
- "Rakefile" | ||
|
||
Lint/StructNewOverride: | ||
Enabled: true | ||
Comment on lines
-52
to
-53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because of |
||
|
||
Metrics/AbcSize: | ||
Max: 35 | ||
Exclude: | ||
|
@@ -84,6 +70,9 @@ Performance/Casecmp: | |
Security/YAMLLoad: | ||
Enabled: false | ||
|
||
Style/AccessorGrouping: | ||
Enabled: false | ||
Comment on lines
+73
to
+74
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one caused violations in this repo so I turned it off. Enabling it would mean we would lose our ability to add comments for each individual accessor: attr_accessor :one # Comment describing :one
attr_accessor :two # Comment describing :two Rubocop wanted: attr_accessor :one, :two |
||
|
||
Style/BarePercentLiterals: | ||
EnforcedStyle: percent_q | ||
|
||
|
@@ -96,21 +85,9 @@ Style/Documentation: | |
Style/EmptyMethod: | ||
EnforcedStyle: expanded | ||
|
||
Style/ExponentialNotation: | ||
Enabled: true | ||
|
||
Style/FrozenStringLiteralComment: | ||
EnforcedStyle: never | ||
|
||
Style/HashEachMethods: | ||
Enabled: true | ||
|
||
Style/HashTransformKeys: | ||
Enabled: true | ||
|
||
Style/HashTransformValues: | ||
Enabled: true | ||
|
||
Style/Lambda: | ||
EnforcedStyle: literal | ||
|
||
|
@@ -131,6 +108,3 @@ Style/StringLiterals: | |
|
||
Style/StringLiteralsInInterpolation: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/StructInheritance: | ||
Enabled: true |
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.
This automatically opts us into new rules that are added in future versions of rubocop. So we no longer need to explicitly list the new cops with
Enabled: true
every time we update the gems.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.
❤️