From 96a6019d3693a29f6aff160844f9019ae0901d8c Mon Sep 17 00:00:00 2001 From: AlexHaxe Date: Tue, 1 May 2018 20:12:34 +0200 Subject: [PATCH 1/2] fix wrap check for Dot --- src/checkstyle/checks/whitespace/IndentationCheck.hx | 1 + test/checks/whitespace/IndentationCheckTest.hx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/checkstyle/checks/whitespace/IndentationCheck.hx b/src/checkstyle/checks/whitespace/IndentationCheck.hx index 58b3b15c..8080e3a6 100644 --- a/src/checkstyle/checks/whitespace/IndentationCheck.hx +++ b/src/checkstyle/checks/whitespace/IndentationCheck.hx @@ -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); } diff --git a/test/checks/whitespace/IndentationCheckTest.hx b/test/checks/whitespace/IndentationCheckTest.hx index 0ac8e8f0..07875c37 100644 --- a/test/checks/whitespace/IndentationCheckTest.hx +++ b/test/checks/whitespace/IndentationCheckTest.hx @@ -162,6 +162,9 @@ long comment .data() .build() .run(); + builder + .create + .something(); } } /* From 7643bfbc5cdc02fb35a5df637f9a9f5689df5523 Mon Sep 17 00:00:00 2001 From: AlexHaxe Date: Tue, 1 May 2018 20:15:17 +0200 Subject: [PATCH 2/2] update CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index b7e605ac..f3b198cb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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