-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RuboCop 1.64 added support for passing in a config, which will then construct the correct url for non-buildin departments that have `DocumentationBaseURL` set.
- Loading branch information
Showing
5 changed files
with
140 additions
and
7 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
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
100 changes: 100 additions & 0 deletions
100
test/expectations/diagnostics/rubocop_extension_cop.exp.json
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,100 @@ | ||
{ | ||
"result": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 5, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 5, | ||
"character": 25 | ||
} | ||
}, | ||
"severity": 3, | ||
"code": "Minitest/AssertEmptyLiteral", | ||
"codeDescription": { | ||
"href": "https://docs.rubocop.org/rubocop-minitest/cops_minitest.html#minitestassertemptyliteral" | ||
}, | ||
"source": "RuboCop", | ||
"message": "Minitest/AssertEmptyLiteral: Prefer using `assert_empty(foo)`.", | ||
"data": { | ||
"correctable": true, | ||
"code_actions": [ | ||
{ | ||
"title": "Autocorrect Minitest/AssertEmptyLiteral", | ||
"kind": "quickfix", | ||
"isPreferred": true, | ||
"edit": { | ||
"documentChanges": [ | ||
{ | ||
"textDocument": { | ||
"uri": "file:///fake", | ||
"version": null | ||
}, | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 5, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 5, | ||
"character": 16 | ||
} | ||
}, | ||
"newText": "assert_empty" | ||
}, | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 5, | ||
"character": 17 | ||
}, | ||
"end": { | ||
"line": 5, | ||
"character": 24 | ||
} | ||
}, | ||
"newText": "foo" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"title": "Disable Minitest/AssertEmptyLiteral for this line", | ||
"kind": "quickfix", | ||
"edit": { | ||
"documentChanges": [ | ||
{ | ||
"textDocument": { | ||
"uri": "file:///fake", | ||
"version": null | ||
}, | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 5, | ||
"character": 25 | ||
}, | ||
"end": { | ||
"line": 5, | ||
"character": 25 | ||
} | ||
}, | ||
"newText": " # rubocop:disable Minitest/AssertEmptyLiteral" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} |
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 @@ | ||
# typed: true | ||
# frozen_string_literal: true | ||
|
||
class ExampleTest < Minitest::Test | ||
def test_public | ||
assert_equal([], foo) | ||
end | ||
end |