Skip to content

Commit

Permalink
fix wrap check for Dot in IndentationCheck (#403)
Browse files Browse the repository at this point in the history
* fix wrap check for Dot
  • Loading branch information
AlexHaxe authored May 1, 2018
1 parent 7aa7a85 commit 51c4330
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- Added unittests for ParserQueue and CheckerPool [#393](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/393)
- Added unittests for TokenTree structure verification [#400](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/400)
- Removed `.` from default settings in SeparatorWrapCheck [#400](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/400)
- Improved wrapped code detection [#392](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/392)
- Improved wrapped code detection [#392](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/392) + [#403](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/403)

## version 2.2.1

Expand Down
1 change: 1 addition & 0 deletions src/checkstyle/checks/whitespace/IndentationCheck.hx
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ class IndentationCheck extends Check {
for (token in tokenList) {
var pos = token.getPos();
var child:TokenTree = token.getFirstChild();
if (token.is(Dot)) pos = token.parent.getPos();
if (child.is(BkOpen)) continue;
ignoreRange(pos, wrapped);
}
Expand Down
3 changes: 3 additions & 0 deletions test/checks/whitespace/IndentationCheckTest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ long comment
.data()
.build()
.run();
builder
.create
.something();
}
}
/*
Expand Down

0 comments on commit 51c4330

Please sign in to comment.