Skip to content

Commit 1205f77

Browse files
committed
fixed suppress issue and haxelib release
1 parent f1aa8b0 commit 1205f77

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

checkstyle/checks/CyclomaticComplexityCheck.hx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ using Lambda;
1111

1212
@name("CyclomaticComplexity")
1313
@desc("McCabe simplified cyclomatic complexity check")
14+
@SuppressWarnings(['checkstyle:CyclomaticComplexity', 'checkstyle:LeftCurly', 'checkstyle:RightCurly'])
1415
class CyclomaticComplexityCheck extends Check {
1516

1617
public var thresholds:Array<Threshold>;
@@ -60,8 +61,6 @@ class CyclomaticComplexityCheck extends Check {
6061
}
6162

6263
// This would not pass the cyclomatic complexity test.
63-
64-
@SuppressWarnings(['checkstyle:CyclomaticComplexity', 'checkstyle:LeftCurly'])
6564
function evaluateExpr(e:Expr):Int {
6665
if (e == null || e.expr == null) return 0;
6766
return switch(e.expr) {

checkstyle/checks/RightCurlyCheck.hx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ class RightCurlyCheck extends Check {
172172
}
173173

174174
function checkPos(pos:Position, singleLine:Bool) {
175+
if (isPosSuppressed(pos)) return;
175176
var bracePos:Int = checker.file.content.lastIndexOf("}", pos.max);
176177
if (bracePos < 0 || bracePos < pos.min) return;
177178

haxelib.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
"cross"
1313
],
1414
"description": "Automated code analysis ideal for projects that want to enforce a coding standard.",
15-
"contributors": ["adireddy"],
16-
"releasenote": "added AccessOrderCheck which replaces OverrideCheck",
17-
"version": "1.1.8",
15+
"contributors": [
16+
"adireddy"
17+
],
18+
"releasenote": "added RightCurlyCheck",
19+
"version": "1.1.9",
1820
"url": "https://github.com/adireddy/haxe-checkstyle",
1921
"dependencies": {
2022

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "checkstyle",
3-
"version": "1.1.8",
3+
"version": "1.1.9",
44
"description": "Automated code analysis ideal for projects that want to enforce a coding standard.",
55
"repository": {
66
"type": "git",

resources/static-analysis.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060
</file>
6161
<file name="checkstyle&#x2F;checks&#x2F;ReturnCheck.hx">
6262
</file>
63+
<file name="checkstyle&#x2F;checks&#x2F;RightCurlyCheck.hx">
64+
</file>
6365
<file name="checkstyle&#x2F;checks&#x2F;SpacingCheck.hx">
6466
</file>
6567
<file name="checkstyle&#x2F;checks&#x2F;TabForAligningCheck.hx">

0 commit comments

Comments
 (0)