mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Remove normalize
parameter from expect_issue
(#249)
* Add `normalize` parameter to `expect_correction`
* Convert Style/IsAFilter spec
* Revert "Add `normalize` parameter to `expect_correction`"
This reverts commit 4b67e4b900
.
* Remove `normalize` parameter from `expect_issue`
* Require indentation if multiple issues on a single line
* Update `Style/IsAFilter` spec
* Update `ExpectIssue` documentation
* Add missing `expect_no_corrections`
* Use carets and space with issues at column 1 or 2
* Update `expect_issue` docs
This commit is contained in:
parent
7cb0c15747
commit
7b437fbd2f
9 changed files with 182 additions and 103 deletions
|
@ -5,7 +5,7 @@ module Ameba::Rule::Layout
|
|||
|
||||
describe TrailingBlankLines do
|
||||
it "passes if there is a blank line at the end of a source" do
|
||||
expect_no_issues subject, "a = 1\n", normalize: false
|
||||
expect_no_issues subject, "a = 1\n"
|
||||
end
|
||||
|
||||
it "passes if source is empty" do
|
||||
|
@ -18,12 +18,12 @@ module Ameba::Rule::Layout
|
|||
end
|
||||
|
||||
it "fails if there more then one blank line at the end of a source" do
|
||||
source = expect_issue subject, "a = 1\n \n # error: Excessive trailing newline detected", normalize: false
|
||||
source = expect_issue subject, "a = 1\n \n # error: Excessive trailing newline detected"
|
||||
expect_no_corrections source
|
||||
end
|
||||
|
||||
it "fails if last line is not blank" do
|
||||
source = expect_issue subject, "\n\n\n puts 22 # error: Trailing newline missing", normalize: false
|
||||
source = expect_issue subject, "\n\n\n puts 22 # error: Trailing newline missing"
|
||||
expect_correction source, "\n\n\n puts 22\n"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue