Skip to content

Commit

Permalink
fix position reporting for SpacingCheck if checking absence of spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
RealyUniqueName committed Nov 3, 2016
1 parent 736d288 commit 184bab3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/checkstyle/checks/whitespace/SpacingCheck.hx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class SpacingCheck extends Check {
case ANY:
case SHOULD_NOT:
if (e2.pos.min - e1.pos.min > '$name('.length) {
logRange('Space between "$name" and "("', e1.pos.max, e2.pos.min);
logRange('Space between "$name" and "("', e2.pos.max, e2.pos.min);
}
case SHOULD:
if (e2.pos.min - e1.pos.min < '$name ('.length) {
Expand All @@ -123,7 +123,7 @@ class SpacingCheck extends Check {
case ANY:
case SHOULD_NOT:
if (checkPos < 0) {
logRange('Space between "$name" and "("', fileCheckPos, fileCheckPos + '$name ('.length);
logRange('Space between "$name" and "("', check.pos.min, check.pos.max);
}
case SHOULD:
if (checkPos > -1) {
Expand Down

0 comments on commit 184bab3

Please sign in to comment.