Skip to content

Commit

Permalink
fix compilation to JS (used in vscode-checkstyle extension) (#379)
Browse files Browse the repository at this point in the history
* fix compilation to JS (used in vscode-checkstyle extension)
* remove fixed munit version
  • Loading branch information
AlexHaxe authored Apr 16, 2018
1 parent 23f7ce0 commit ed797c3
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ install:
- haxelib install compiletime 2.6.0
- haxelib install hxargs 3.0.2
- haxelib install mcover 2.1.1
- haxelib install munit 2.2.1
- haxelib install munit
script:
- haxe buildAll.hxml

Expand Down
2 changes: 1 addition & 1 deletion buildTest.hxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildGlobal.hxml
-lib mcover:2.1.1
-lib munit:2.2.1
-lib munit
-D unittest
-x TestMain
--macro mcover.MCover.coverage(['checkstyle'], ['src'], ['checkstyle.reporter', 'checkstyle.Main'])
Expand Down
2 changes: 1 addition & 1 deletion gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = function(grunt) {
"haxelib install hxargs 3.0.2 && " +
"haxelib install compiletime 2.6.0 && " +
"haxelib install mcover 2.1.1 && " +
"haxelib install munit 2.2.1"
"haxelib install munit"
}
},

Expand Down
4 changes: 4 additions & 0 deletions src/checkstyle/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ class Main {
if (SHOW_PROGRESS) ReporterManager.INSTANCE.addReporter(new ProgressReporter(files.length));
if (EXIT_CODE) ReporterManager.INSTANCE.addReporter(new ExitCodeReporter());

#if (neko || cpp)
if (disableThreads) {
checker.process(toProcess, excludesMap);
}
Expand All @@ -390,6 +391,9 @@ class Main {
while (!checkerPool.isFinished()) Sys.sleep(0.1);
ReporterManager.INSTANCE.finish();
}
#else
checker.process(toProcess, excludesMap);
#end
}

function traverse(path:String, files:Array<String>) {
Expand Down
10 changes: 9 additions & 1 deletion src/checkstyle/reporter/ReporterManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -114,4 +114,12 @@ class ReporterManager {
message:step + " failed: " + e + "\nStacktrace: " + CallStack.toString(CallStack.exceptionStack())
};
}
}
}

#if (!neko && !cpp)
class Mutex {
public function new() {}
public function acquire() {}
public function release() {}
}
#end

0 comments on commit ed797c3

Please sign in to comment.