Fix new-lines rule by supporting context in line rules#798
Open
kimzuni wants to merge 2 commits intoadrienverge:masterfrom
Open
Fix new-lines rule by supporting context in line rules#798kimzuni wants to merge 2 commits intoadrienverge:masterfrom
kimzuni wants to merge 2 commits intoadrienverge:masterfrom
Conversation
Previously, the rule only checked the first line. It now checks all lines, but stops further checks once the first problem is detected, ensuring that only a single problem is reported per file.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds support for using
contextin line-type rules and updates thenew-linesrule to stop checking after the first detected problem.contextis now applied to line-type rules, which allows a single problem to be reported per file. While checking the tests, I noticed that the expected problem position was set to(2, 4), but the actual position seems to be(2, 5), so I updated the expectation accordingly.Fixes #475