Skip to content

Commit

Permalink
fix so we get the old behavior for UppercaseSentenceStart - seems to …
Browse files Browse the repository at this point in the history
…change GenericUnpairedBracketsRule, but as getColumn() is deprecated, we don't need to care
  • Loading branch information
danielnaber committed Feb 8, 2017
1 parent b4ee639 commit 237c11a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -963,7 +963,11 @@ public List<RuleMatch> call() throws Exception {
RuleMatch newMatch = new RuleMatch(match.getRule(), newFromPos, newToPos, match.getMessage(), match.getShortMessage());
newMatch.setLine(match.getLine());
newMatch.setEndLine(match.getEndLine());
newMatch.setColumn(match.getColumn());
if (match.getLine() == 0) {
newMatch.setColumn(match.getColumn() + 1);
} else {
newMatch.setColumn(match.getColumn());
}
newMatch.setEndColumn(match.getEndColumn());
newMatch.setSuggestedReplacements(match.getSuggestedReplacements());
adaptedMatches.add(newMatch);
Expand Down
Expand Up @@ -75,7 +75,7 @@ public void testRuleMatchPositions() throws IOException {
assertThat(match1.getToPos(), is(6));
assertThat(match1.getLine(), is(0));
assertThat(match1.getEndLine(), is(0));
assertThat(match1.getColumn(), is(5));
assertThat(match1.getColumn(), is(6));
assertThat(match1.getEndColumn(), is(6));

RuleMatch match2 = lt.check("This.\nSome stuff.\nIt »is a test.").get(0);
Expand Down

0 comments on commit 237c11a

Please sign in to comment.