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
Updated channel and documentation to Rubocop v0.80.0 #225
Merged
filipesperandio
merged 10 commits into
codeclimate:channel/rubocop-0-80
from
DanielWright:channel/rubocop-0-80
Feb 27, 2020
Merged
Changes from 8 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
6ce7790
Updated channel and documentation to Rubocop v0.79.0 (#222)
filipesperandio db89ffe
Bumps 'rubocop' Dependency to v0.80.0
DanielWright 99f0cb5
Handles Edge-Case in Documentation Parsing Logic
DanielWright e2625ec
Updates Scraped Documentation
DanielWright 82a53da
Minor Delinting
DanielWright 92491f6
Fixes Namespace Warnings in Config Files
DanielWright fc50d58
Possible Fix for Config Upgrader Spec
DanielWright 51b5aa4
Updates ConfigUpgrader Spec
DanielWright a81a64e
Removes New Cops from Base Config
DanielWright c53599f
Merge branch 'channel/rubocop-0-80' into channel/rubocop-0-80
filipesperandio File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
This cop checks that there is an `# rubocop:enable ...` statement | ||
after a `# rubocop:disable ...` statement. This will prevent leaving | ||
cop disables on wide ranges of code, that latter contributors to | ||
a file wouldn't be aware of. | ||
|
||
### Example: | ||
# Lint/MissingCopEnableDirective: | ||
# MaximumRangeSize: .inf | ||
|
||
# good | ||
# rubocop:disable Layout/SpaceAroundOperators | ||
x= 0 | ||
# rubocop:enable Layout/SpaceAroundOperators | ||
# y = 1 | ||
# EOF | ||
|
||
# bad | ||
# rubocop:disable Layout/SpaceAroundOperators | ||
x= 0 | ||
# EOF | ||
|
||
### Example: | ||
# Lint/MissingCopEnableDirective: | ||
# MaximumRangeSize: 2 | ||
|
||
# good | ||
# rubocop:disable Layout/SpaceAroundOperators | ||
x= 0 | ||
# With the previous, there are 2 lines on which cop is disabled. | ||
# rubocop:enable Layout/SpaceAroundOperators | ||
|
||
# bad | ||
# rubocop:disable Layout/SpaceAroundOperators | ||
x= 0 | ||
x += 1 | ||
# Including this, that's 3 lines on which the cop is disabled. | ||
# rubocop:enable Layout/SpaceAroundOperators |
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,3 +1,22 @@ | ||
# The Lint/RedundantCopDisableDirective cop needs to be disabled so as | ||
# to be able to provide a (bad) example of a redundant disable. | ||
# rubocop:disable Lint/RedundantCopDisableDirective | ||
# rubocop:disable Lint/RedundantCopDisableDirective | ||
This cop detects instances of rubocop:disable comments that can be | ||
removed without causing any offenses to be reported. It's implemented | ||
as a cop in that it inherits from the Cop base class and calls | ||
add_offense. The unusual part of its implementation is that it doesn't | ||
have any on_* methods or an investigate method. This means that it | ||
doesn't take part in the investigation phase when the other cops do | ||
their work. Instead, it waits until it's called in a later stage of the | ||
execution. The reason it can't be implemented as a normal cop is that | ||
it depends on the results of all other cops to do its work. | ||
|
||
|
||
### Example: | ||
# bad | ||
# rubocop:disable Layout/LineLength | ||
x += 1 | ||
# rubocop:enable Layout/LineLength | ||
|
||
# good | ||
x += 1 |
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,3 +1,28 @@ | ||
# The Lint/RedundantCopEnableDirective cop needs to be disabled so as | ||
# to be able to provide a (bad) example of an unneeded enable. | ||
# rubocop:disable Lint/RedundantCopEnableDirective | ||
# rubocop:disable Lint/RedundantCopEnableDirective | ||
This cop detects instances of rubocop:enable comments that can be | ||
removed. | ||
|
||
When comment enables all cops at once `rubocop:enable all` | ||
that cop checks whether any cop was actually enabled. | ||
### Example: | ||
# bad | ||
foo = 1 | ||
# rubocop:enable Layout/LineLength | ||
|
||
# good | ||
foo = 1 | ||
### Example: | ||
# bad | ||
# rubocop:disable Style/StringLiterals | ||
foo = "1" | ||
# rubocop:enable Style/StringLiterals | ||
baz | ||
# rubocop:enable all | ||
|
||
# good | ||
# rubocop:disable Style/StringLiterals | ||
foo = "1" | ||
# rubocop:enable all | ||
baz |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Detects double disable comments on one line. This is mostly to catch | ||
automatically generated comments that need to be regenerated. | ||
|
||
### Example: | ||
# bad | ||
def f # rubocop:disable Style/For # rubocop:disable Metrics/AbcSize | ||
end | ||
|
||
# good | ||
# rubocop:disable Metrics/AbcSize | ||
def f # rubocop:disable Style/For | ||
end | ||
# rubocop:enable Metrics/AbcSize | ||
|
||
# if both fit on one line | ||
def f # rubocop:disable Style/For, Metrics/AbcSize | ||
end |
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.
Trailing comma, is this a deliberate choice?
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 appears to be a choice made upstream, whether a typo or deliberate I cannot say.