diff --git a/haxelib.json b/haxelib.json index 4795d86f..b2249002 100644 --- a/haxelib.json +++ b/haxelib.json @@ -16,8 +16,8 @@ "contributors": [ "adireddy" ], - "releasenote": "enhancement to RedundantModifier check", - "version": "2.1.4", + "releasenote": "fix for #296, added SuppressWarnings for SimplifyBooleanExpression check", + "version": "2.1.5", "url": "https://github.com/HaxeCheckstyle/haxe-checkstyle", "dependencies": { diff --git a/package.json b/package.json index 7289f723..7b3bba4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkstyle", - "version": "2.1.4", + "version": "2.1.5", "description": "Automated code analysis ideal for projects that want to enforce a coding standard.", "repository": { "type": "git", diff --git a/src/checkstyle/checks/coding/SimplifyBooleanExpressionCheck.hx b/src/checkstyle/checks/coding/SimplifyBooleanExpressionCheck.hx index 418991f6..3fd40037 100644 --- a/src/checkstyle/checks/coding/SimplifyBooleanExpressionCheck.hx +++ b/src/checkstyle/checks/coding/SimplifyBooleanExpressionCheck.hx @@ -27,6 +27,7 @@ class SimplifyBooleanExpressionCheck extends Check { ], ALL); for (token in acceptableTokens) { + if (isPosSuppressed(token.pos)) continue; if (token.is(Kwd(KwdTrue)) || token.is(Kwd(KwdFalse))) checkToken(token); } } diff --git a/test/checks/coding/SimplifyBooleanExpressionCheckTest.hx b/test/checks/coding/SimplifyBooleanExpressionCheckTest.hx index 7e5f4cfa..18a2fd5b 100644 --- a/test/checks/coding/SimplifyBooleanExpressionCheckTest.hx +++ b/test/checks/coding/SimplifyBooleanExpressionCheckTest.hx @@ -17,6 +17,10 @@ class SimplifyBooleanExpressionCheckTest extends CheckTestCase