diff --git a/checkstyle/checks/CyclomaticComplexityCheck.hx b/checkstyle/checks/CyclomaticComplexityCheck.hx index c6888e49..5d2afb1b 100644 --- a/checkstyle/checks/CyclomaticComplexityCheck.hx +++ b/checkstyle/checks/CyclomaticComplexityCheck.hx @@ -11,6 +11,7 @@ using Lambda; @name("CyclomaticComplexity") @desc("McCabe simplified cyclomatic complexity check") +@SuppressWarnings(['checkstyle:CyclomaticComplexity', 'checkstyle:LeftCurly', 'checkstyle:RightCurly']) class CyclomaticComplexityCheck extends Check { public var thresholds:Array; @@ -60,8 +61,6 @@ class CyclomaticComplexityCheck extends Check { } // This would not pass the cyclomatic complexity test. - - @SuppressWarnings(['checkstyle:CyclomaticComplexity', 'checkstyle:LeftCurly']) function evaluateExpr(e:Expr):Int { if (e == null || e.expr == null) return 0; return switch(e.expr) { diff --git a/checkstyle/checks/RightCurlyCheck.hx b/checkstyle/checks/RightCurlyCheck.hx index 5801660c..dea5bb04 100644 --- a/checkstyle/checks/RightCurlyCheck.hx +++ b/checkstyle/checks/RightCurlyCheck.hx @@ -172,6 +172,7 @@ class RightCurlyCheck extends Check { } function checkPos(pos:Position, singleLine:Bool) { + if (isPosSuppressed(pos)) return; var bracePos:Int = checker.file.content.lastIndexOf("}", pos.max); if (bracePos < 0 || bracePos < pos.min) return; diff --git a/haxelib.json b/haxelib.json index 9332755d..d77f8590 100644 --- a/haxelib.json +++ b/haxelib.json @@ -12,9 +12,11 @@ "cross" ], "description": "Automated code analysis ideal for projects that want to enforce a coding standard.", - "contributors": ["adireddy"], - "releasenote": "added AccessOrderCheck which replaces OverrideCheck", - "version": "1.1.8", + "contributors": [ + "adireddy" + ], + "releasenote": "added RightCurlyCheck", + "version": "1.1.9", "url": "https://github.com/adireddy/haxe-checkstyle", "dependencies": { diff --git a/package.json b/package.json index d6e2c2aa..433d4428 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "checkstyle", - "version": "1.1.8", + "version": "1.1.9", "description": "Automated code analysis ideal for projects that want to enforce a coding standard.", "repository": { "type": "git", diff --git a/resources/static-analysis.xml b/resources/static-analysis.xml index dad29841..39020a31 100644 --- a/resources/static-analysis.xml +++ b/resources/static-analysis.xml @@ -60,6 +60,8 @@ + +