Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
adireddy committed Nov 13, 2015
2 parents 0e5a1b9 + 1205f77 commit 46195eb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
3 changes: 1 addition & 2 deletions checkstyle/checks/CyclomaticComplexityCheck.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Threshold>;
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions checkstyle/checks/RightCurlyCheck.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 5 additions & 3 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 2 additions & 0 deletions resources/static-analysis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@
</file>
<file name="checkstyle&#x2F;checks&#x2F;ReturnCheck.hx">
</file>
<file name="checkstyle&#x2F;checks&#x2F;RightCurlyCheck.hx">
</file>
<file name="checkstyle&#x2F;checks&#x2F;SpacingCheck.hx">
</file>
<file name="checkstyle&#x2F;checks&#x2F;TabForAligningCheck.hx">
Expand Down

0 comments on commit 46195eb

Please sign in to comment.