diff --git a/.github/workflows/formatter.yml b/.github/workflows/formatter.yml index af60a1e..ff4153f 100644 --- a/.github/workflows/formatter.yml +++ b/.github/workflows/formatter.yml @@ -14,7 +14,7 @@ jobs: build: strategy: matrix: - haxe-version: ['4.3.2', 'nightly'] + haxe-version: ['4.3.3', 'nightly'] platform: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.platform }} steps: @@ -51,10 +51,9 @@ jobs: - name: Build JSON schema run: npx haxe buildSchema.hxml - name: Run eval tests - if: (matrix.haxe-version == '4.3.2') + if: (matrix.haxe-version == '4.3.3') run: npx haxe -D codecov_json test.hxml - name: Run Java tests - if: (matrix.haxe-version == 'nightly') run: npx haxe -D codecov_json testJava.hxml - name: Run Node version with --check run: node run.js -s . --check @@ -74,5 +73,5 @@ jobs: # name: formatter.js # path: bin/formatter.js - name: Upload results to codecov - if: success() && matrix.platform == 'ubuntu-latest' && (matrix.haxe-version == '4.3.2') + if: success() && matrix.platform == 'ubuntu-latest' && (matrix.haxe-version == '4.3.3') run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" diff --git a/CHANGELOG.md b/CHANGELOG.md index ae1c8c4..f425f87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ ## dev branch / next version (1.x.x) +## version 1.16.0 (2024-02-10) + +- Added `wrapping.mapWrap`, fixes [#675](https://github.com/HaxeCheckstyle/haxe-formatter/issues/675) ([#677](https://github.com/HaxeCheckstyle/haxe-formatter/issues/677)) +- Fixed comment indentation in empty switch cases, fixes [#392](https://github.com/HaxeCheckstyle/haxe-formatter/issues/392), [#174](https://github.com/HaxeCheckstyle/haxe-formatter/issues/174) ([#677](https://github.com/HaxeCheckstyle/haxe-formatter/issues/677)) +- Fixed multiline comment indentation with conditionals, fixes [#499](https://github.com/HaxeCheckstyle/haxe-formatter/issues/499) ([#677](https://github.com/HaxeCheckstyle/haxe-formatter/issues/677)) +- Fixed empty lines between static functions in abstract, fixes [#356](https://github.com/HaxeCheckstyle/haxe-formatter/issues/356) ([#677](https://github.com/HaxeCheckstyle/haxe-formatter/issues/677)) +- Fixed multiline string literals with empty lines, fixes [#368](https://github.com/HaxeCheckstyle/haxe-formatter/issues/368) ([#677](https://github.com/HaxeCheckstyle/haxe-formatter/issues/677)) +- Fixed expressionIf for array comprehension, fixes [#365](https://github.com/HaxeCheckstyle/haxe-formatter/issues/365) ([#677](https://github.com/HaxeCheckstyle/haxe-formatter/issues/677)) + ## version 1.15.0 (2023-09-05) - Added `sameLine.ifElseSemicolonNextLine` to allow breaking `if (true) foo; else foo;`, fixes [#612](https://github.com/HaxeCheckstyle/haxe-formatter/issues/612) ([#668](https://github.com/HaxeCheckstyle/haxe-formatter/issues/668)) diff --git a/buildJava.hxml b/buildJava.hxml index e06c243..fd60c6e 100644 --- a/buildJava.hxml +++ b/buildJava.hxml @@ -1,4 +1,3 @@ buildCommon.hxml --D jvm --java out +--jvm out/Cli.jar -main formatter.Cli diff --git a/display.hxml b/display.hxml index 213c639..df3d264 100644 --- a/display.hxml +++ b/display.hxml @@ -11,3 +11,4 @@ -lib munit -lib safety -lib test-adapter +-lib instrument diff --git a/haxe_libraries/tokentree.hxml b/haxe_libraries/tokentree.hxml index 33ff084..02d86c4 100644 --- a/haxe_libraries/tokentree.hxml +++ b/haxe_libraries/tokentree.hxml @@ -1,3 +1,3 @@ -# @install: lix --silent download "haxelib:/tokentree#1.2.10" into tokentree/1.2.10/haxelib --cp ${HAXE_LIBCACHE}/tokentree/1.2.10/haxelib/src --D tokentree=1.2.10 \ No newline at end of file +# @install: lix --silent download "haxelib:/tokentree#1.2.11" into tokentree/1.2.11/haxelib +-cp ${HAXE_LIBCACHE}/tokentree/1.2.11/haxelib/src +-D tokentree=1.2.11 \ No newline at end of file diff --git a/haxelib.json b/haxelib.json index 87ff4ff..449cf12 100644 --- a/haxelib.json +++ b/haxelib.json @@ -8,8 +8,8 @@ "style" ], "description": "A code formatter for Haxe", - "version": "1.15.0", - "releasenote": " Added sameLine.ifElseSemicolonNextLine - see CHANGELOG for details.", + "version": "1.16.0", + "releasenote": "Added wrapping.mapWrap; fixed some indentation issues - see CHANGELOG for details.", "contributors": [ "AlexHaxe", "Gama11" diff --git a/package-lock.json b/package-lock.json index ee520b3..38ed12e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@haxecheckstyle/haxe-formatter", - "version": "1.15.0", + "version": "1.16.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@haxecheckstyle/haxe-formatter", - "version": "1.15.0", + "version": "1.16.0", "license": "MIT", "bin": { "haxe-formatter": "bin/formatter.js" diff --git a/package.json b/package.json index 711ab2e..179b51c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@haxecheckstyle/haxe-formatter", - "version": "1.15.0", + "version": "1.16.0", "description": "A code formatter for Haxe", "repository": { "type": "git", diff --git a/resources/default-hxformat.json b/resources/default-hxformat.json index 26e6a1f..c941abf 100644 --- a/resources/default-hxformat.json +++ b/resources/default-hxformat.json @@ -534,6 +534,69 @@ } ] }, + "mapWrap": { + "defaultWrap": "noWrap", + "rules": [ + { + "conditions": [ + { + "cond": "hasMultilineItems", + "value": 1 + } + ], + "type": "onePerLine" + }, + { + "conditions": [ + { + "cond": "totalItemLength <= n", + "value": 80 + } + ], + "type": "noWrap" + }, + { + "conditions": [ + { + "cond": "anyItemLength <= n", + "value": 30 + }, + { + "cond": "itemCount >= n", + "value": 10 + } + ], + "type": "fillLineWithLeadingBreak" + }, + { + "conditions": [ + { + "cond": "anyItemLength >= n", + "value": 30 + } + ], + "type": "onePerLine" + }, + { + "conditions": [ + { + "cond": "itemCount >= n", + "value": 4 + } + ], + "type": "onePerLine" + }, + { + "conditions": [ + { + "cond": "exceedsMaxLineLength", + "value": 1 + } + ], + "type": "onePerLine" + } + ] + }, "maxLineLength": 160, "metadataCallParameter": { "defaultWrap": "noWrap", diff --git a/resources/hxformat-schema.json b/resources/hxformat-schema.json index e605673..8bd9b7e 100644 --- a/resources/hxformat-schema.json +++ b/resources/hxformat-schema.json @@ -1285,6 +1285,10 @@ "description": "type parameter wrapping rules", "$ref": "#/definitions/formatter.config.WrapRules" }, + "mapWrap": { + "description": "map literal wrapping rules does not affect map comprehension, use \"sameLine.comprehensionFor\"", + "$ref": "#/definitions/formatter.config.WrapRules" + }, "objectLiteral": { "description": "object literal wrapping rules", "$ref": "#/definitions/formatter.config.WrapRules" diff --git a/src/formatter/codedata/ParsedCode.hx b/src/formatter/codedata/ParsedCode.hx index fecca49..e643b07 100644 --- a/src/formatter/codedata/ParsedCode.hx +++ b/src/formatter/codedata/ParsedCode.hx @@ -73,6 +73,7 @@ class ParsedCode { case Binop(OpGte): skipCount = 1; case Const(CMarkup(_)): + elimateMulitlineEmptyLines(token.pos); var skipIndex = index + 1; while (true) { if (tokens[skipIndex].pos.min >= token.pos.max) { @@ -89,12 +90,23 @@ class ParsedCode { if (v.startsWith("-")) { skipCount = 1; } + case Comment(_) | Const(CString(_)): + elimateMulitlineEmptyLines(token.pos); + skipCount = 0; default: skipCount = 0; } } } + function elimateMulitlineEmptyLines(pos:Position) { + var start:LinePos = getLinePos(pos.min); + var end:LinePos = getLinePos(pos.max); + for (i in start.line...end.line) { + emptyLines.remove(i); + } + } + public function getTokenTree(entryPoint:Null = null):TokenTree { if (tokens == null) { return null; diff --git a/src/formatter/codedata/TokenList.hx b/src/formatter/codedata/TokenList.hx index 3da024a..773e2e8 100644 --- a/src/formatter/codedata/TokenList.hx +++ b/src/formatter/codedata/TokenList.hx @@ -2,6 +2,8 @@ package formatter.codedata; import formatter.config.Config; import formatter.config.WhitespacePolicy; +import formatter.marker.Indenter; +import formatter.marker.MarkLineEnds; #if debugLog import haxe.PosInfos; import sys.io.File; @@ -598,7 +600,8 @@ class TokenList { info.additionalIndent = indent; } - public function increaseIndentBetween(start:Null, end:Null, depth:Int, ?pos:PosInfos) { + public function increaseIndentBetween(start:Null, end:Null, depth:Int, config:Config, parsedCode:ParsedCode, indenter:Indenter, + ?pos:PosInfos) { if ((depth == 0) || (start == null) || (start.index < 0) || (end == null) || (end.index < 0)) { return; } @@ -607,6 +610,7 @@ class TokenList { startIndex++; } var endIndex:Int = end.index; + var outputLineEnds:String = MarkLineEnds.outputLineSeparator(config.lineEnds, parsedCode); for (index in startIndex...endIndex) { var info:Null = tokens[index]; if (info == null) { @@ -616,6 +620,18 @@ class TokenList { logAction(pos, info.token, '${info.additionalIndent} -> ${info.additionalIndent + depth}'); #end info.additionalIndent += depth; + switch (info.token.tok) { + case Comment(s): + var lines:Array = info.text.split(outputLineEnds); + var addIndent:String = indenter.makeIndentString(depth); + if (lines.length > 0) { + for (line in 1...lines.length) { + lines[line] = addIndent + lines[line]; + } + info.text = lines.join(outputLineEnds); + } + default: + } } } diff --git a/src/formatter/config/WrapConfig.hx b/src/formatter/config/WrapConfig.hx index 38cec7b..1a8f7b8 100644 --- a/src/formatter/config/WrapConfig.hx +++ b/src/formatter/config/WrapConfig.hx @@ -42,6 +42,42 @@ typedef WrapConfig = { @:optional var arrayWrap:WrapRules; + /** + map literal wrapping rules + does not affect map comprehension, use "sameLine.comprehensionFor" + **/ + @:default({ + defaultWrap: NoWrap, + rules: [ + { + conditions: [{cond: HasMultiLineItems, value: 1}], + type: OnePerLine + }, + { + conditions: [{cond: TotalItemLengthLessThan, value: 80}], + type: NoWrap + }, + { + conditions: [{cond: AnyItemLengthLessThan, value: 30}, {cond: ItemCountLargerThan, value: 10}], + type: FillLineWithLeadingBreak + }, + { + conditions: [{cond: AnyItemLengthLargerThan, value: 30}], + type: OnePerLine + }, + { + conditions: [{cond: ItemCountLargerThan, value: 4}], + type: OnePerLine + }, + { + conditions: [{cond: ExceedsMaxLineLength, value: 1}], + type: OnePerLine + } + ] + }) + @:optional + var mapWrap:WrapRules; + /** detect arrays in matrix configuration from source noMatrixWrap = no detection diff --git a/src/formatter/marker/MarkSameLine.hx b/src/formatter/marker/MarkSameLine.hx index f193993..a71942e 100644 --- a/src/formatter/marker/MarkSameLine.hx +++ b/src/formatter/marker/MarkSameLine.hx @@ -54,6 +54,12 @@ class MarkSameLine extends MarkerBase { switch (parent.tok) { case Kwd(KwdReturn): return true; + case BkOpen: + return true; + case BrOpen: + if (parent.parent.tok.match(Kwd(KwdFor))) { + return isExpression(parent); + } case Kwd(KwdMacro): return isExpression(parent); case Arrow: diff --git a/src/formatter/marker/MarkerBase.hx b/src/formatter/marker/MarkerBase.hx index b660dc1..b331f35 100644 --- a/src/formatter/marker/MarkerBase.hx +++ b/src/formatter/marker/MarkerBase.hx @@ -100,7 +100,7 @@ class MarkerBase { } public function increaseIndentBetween(start:Null, end:Null, depth:Int, ?pos:PosInfos) { - parsedCode.tokenList.increaseIndentBetween(start, end, depth, pos); + parsedCode.tokenList.increaseIndentBetween(start, end, depth, config, parsedCode, indenter, pos); } public function findTokenAtOffset(offset:Int):Null { diff --git a/src/formatter/marker/wrapping/MarkWrapping.hx b/src/formatter/marker/wrapping/MarkWrapping.hx index c183323..5b97ea0 100644 --- a/src/formatter/marker/wrapping/MarkWrapping.hx +++ b/src/formatter/marker/wrapping/MarkWrapping.hx @@ -245,6 +245,21 @@ class MarkWrapping extends MarkWrappingBase { } function arrayWrapping(token:TokenTree) { + switch (TokenTreeCheckUtils.getBkOpenType(token)) { + case ArrayAccess: + return; + case ArrayLiteral: + arrayLiteralWrapping(token); + case Comprehension: + arrayLiteralWrapping(token); + case MapLiteral: + mapLiteralWrapping(token); + case Unknown: + arrayLiteralWrapping(token); + } + } + + function arrayLiteralWrapping(token:TokenTree) { var bkClose:Null = getCloseToken(token); if ((token.children == null) || (token.children.length <= 0)) { return; @@ -353,6 +368,35 @@ class MarkWrapping extends MarkWrappingBase { return true; } + function mapLiteralWrapping(token:TokenTree) { + var bkClose:Null = getCloseToken(token); + if ((token.children == null) || (token.children.length <= 0)) { + return; + } + var items:Array = makeWrappableItems(token); + var itemsWithoutMetadata:Array = []; + for (item in items) { + switch (item.first.tok) { + case At: + if (item.firstLineLength > 30) { + lineEndBefore(token); + lineEndBefore(item.first); + } + default: + itemsWithoutMetadata.push(item); + } + } + applyWrappingPlace({ + origin: MapWrapping, + start: token, + end: bkClose, + items: itemsWithoutMetadata, + rules: config.wrapping.mapWrap, + useTrailing: true, + overrideAdditionalIndent: null + }); + } + override function calcLineLength(token:TokenTree):Int { if (token == null) { return 0; diff --git a/src/formatter/marker/wrapping/MarkWrappingBase.hx b/src/formatter/marker/wrapping/MarkWrappingBase.hx index dd84cea..7f445b6 100644 --- a/src/formatter/marker/wrapping/MarkWrappingBase.hx +++ b/src/formatter/marker/wrapping/MarkWrappingBase.hx @@ -945,6 +945,8 @@ class MarkWrappingBase extends MarkerBase { "FunctionSignatureWrapping"; case ImplementsWrapping: "ImplementsWrapping"; + case MapWrapping: + "MapWrapping"; case MetadataCallParameterWrapping: "MetadataCallParameterWrapping"; case MethodChainWrapping: @@ -975,6 +977,7 @@ typedef WrappingPlace = { enum WrappingOrigin { AnonTypeWrapping; ArrayWrapping; + MapWrapping; CallParameterWrapping; CasePatternWrapping; FunctionSignatureWrapping; diff --git a/test/testcases/emptylines/issue_356_functions_without_implementation.hxtest b/test/testcases/emptylines/issue_356_functions_without_implementation.hxtest new file mode 100644 index 0000000..4792973 --- /dev/null +++ b/test/testcases/emptylines/issue_356_functions_without_implementation.hxtest @@ -0,0 +1,25 @@ +{ + "emptyLines": { + "abstractEmptyLines": { + "betweenStaticFunctions": 0 + } + } +} + +--- + +@:coreType private abstract EnumUnderlying from T to T { + @:op(A | B) public static function or(lhs:EnumUnderlying, rhs:EnumUnderlying):T; + @:op(A ^ B) public static function xor(lhs:EnumUnderlying, rhs:EnumUnderlying):T; + @:op(A & B) public static function and(lhs:EnumUnderlying, rhs:EnumUnderlying):T; + @:op(~A) public static function bneg(t:EnumUnderlying):T; +} + +--- + +@:coreType private abstract EnumUnderlying from T to T { + @:op(A | B) public static function or(lhs:EnumUnderlying, rhs:EnumUnderlying):T; + @:op(A ^ B) public static function xor(lhs:EnumUnderlying, rhs:EnumUnderlying):T; + @:op(A & B) public static function and(lhs:EnumUnderlying, rhs:EnumUnderlying):T; + @:op(~A) public static function bneg(t:EnumUnderlying):T; +} diff --git a/test/testcases/emptylines/issue_368_multiline_string_literals.hxtest b/test/testcases/emptylines/issue_368_multiline_string_literals.hxtest new file mode 100644 index 0000000..5b5e6f5 --- /dev/null +++ b/test/testcases/emptylines/issue_368_multiline_string_literals.hxtest @@ -0,0 +1,26 @@ +{ +} + +--- + +class Main { + static function main() { + it("part1", { + run(parse(" + +")).should.be(3); + }); + } +} + +--- + +class Main { + static function main() { + it("part1", { + run(parse(" + +")).should.be(3); + }); + } +} diff --git a/test/testcases/indentation/issue_174_comments_before_case.hxtest b/test/testcases/indentation/issue_174_comments_before_case.hxtest index 9edff85..e42d61a 100644 --- a/test/testcases/indentation/issue_174_comments_before_case.hxtest +++ b/test/testcases/indentation/issue_174_comments_before_case.hxtest @@ -55,7 +55,7 @@ class Main { // nothing to do // nothing to do case B: - // nothing to do + // nothing to do default: // nothing to do } diff --git a/test/testcases/indentation/issue_392_case_indentation.hxtest b/test/testcases/indentation/issue_392_case_indentation.hxtest new file mode 100644 index 0000000..2dbefb9 --- /dev/null +++ b/test/testcases/indentation/issue_392_case_indentation.hxtest @@ -0,0 +1,91 @@ +{ + "wrapping": { + "methodChain": { + "rules": [] + } + } +} + +--- + +class Main { + static function main() { + switch ("c") { + case "a": + // nothing to do + case "b": + case _: + // nothing to do + } + switch ("c") { + case "a": + trace("foo"); + // check for "b" + case "b": + case _: + } + } +} + +class Main { + public static function main() { + var value:MyEnum = Math.random() < 0.5 ? A : B; + + switch value { + case A: + // Case A + + case B: + // Case B + trace('hello'); + + case C: + // Case C + + case D: + // Case D + } + } +} + +--- + +class Main { + static function main() { + switch ("c") { + case "a": + // nothing to do + case "b": + case _: + // nothing to do + } + switch ("c") { + case "a": + trace("foo"); + // check for "b" + case "b": + case _: + } + } +} + +class Main { + public static function main() { + var value:MyEnum = Math.random() < 0.5 ? A : B; + + switch value { + case A: + // Case A + + case B: + // Case B + trace('hello'); + + case C: + // Case C + + case D: + // Case D + } + } +} diff --git a/test/testcases/indentation/issue_499_conditional_comment.hxtest b/test/testcases/indentation/issue_499_conditional_comment.hxtest new file mode 100644 index 0000000..10aa77a --- /dev/null +++ b/test/testcases/indentation/issue_499_conditional_comment.hxtest @@ -0,0 +1,33 @@ +{} + +--- + +class Main { + #if true + function foo() { + #else + function foo() { + #end + } + + /** + Doc. + **/ + public static function bar():Void {} +} + +--- + +class Main { + #if true + function foo() { + #else + function foo() { + #end + } + + /** + Doc. + **/ + public static function bar():Void {} +} diff --git a/test/testcases/indentation/issue_676_conditionals.hxtest b/test/testcases/indentation/issue_676_conditionals.hxtest new file mode 100644 index 0000000..00e5e05 --- /dev/null +++ b/test/testcases/indentation/issue_676_conditionals.hxtest @@ -0,0 +1,83 @@ +{ + "lineEnds": { + "leftCurly": "both", + "rightCurly": "both", + "emptyCurly": "break", + "objectLiteralCurly": { + "leftCurly": "after" + } + }, + "sameLine": { + "ifElse": "next", + "doWhile": "next", + "tryBody": "next", + "tryCatch": "next" + } +} + +--- + +// @formatter:off +class Main +{ + static function main() + { + for (event in eventsPushed) + { + #if LUA_ALLOWED + var luaToLoad:String = ''; + #if MODS_ALLOWED + luaToLoad = Paths.modFolders('custom_events/$event.lua'); + if (FileSystem.exists(luaToLoad)) + { + luaArray.push(new FunkinLua(luaToLoad)); + } + else + { + #end + luaToLoad = Paths.getPreloadPath('custom_events/$event.lua'); + if (OpenFlAssets.exists(luaToLoad)) + { + luaArray.push(new FunkinLua(luaToLoad)); + } + #if MODS_ALLOWED + } + #end + #end + } + } +} + + +--- + +// @formatter:off +class Main +{ + static function main() + { + for (event in eventsPushed) + { + #if LUA_ALLOWED + var luaToLoad:String = ''; + #if MODS_ALLOWED + luaToLoad = Paths.modFolders('custom_events/$event.lua'); + if (FileSystem.exists(luaToLoad)) + { + luaArray.push(new FunkinLua(luaToLoad)); + } + else + { + #end + luaToLoad = Paths.getPreloadPath('custom_events/$event.lua'); + if (OpenFlAssets.exists(luaToLoad)) + { + luaArray.push(new FunkinLua(luaToLoad)); + } + #if MODS_ALLOWED + } + #end + #end + } + } +} diff --git a/test/testcases/sameline/issue_365_array_comprehension.hxtest b/test/testcases/sameline/issue_365_array_comprehension.hxtest new file mode 100644 index 0000000..ee70429 --- /dev/null +++ b/test/testcases/sameline/issue_365_array_comprehension.hxtest @@ -0,0 +1,47 @@ +{} + +--- + +class Main { + static function main() { + return [ + for (meta in node.metadata) { + var child = node.children[meta - 1]; + if (child == null) 0 else value(child); + } + ].sum(); + } + + static function main() { + [ + if (foo) bar else foo, + if (foo) bar else foo, + if (foo) bar else foo, + if (foo) bar else foo, + if (foo) bar else foo + ] + } +} + +--- + +class Main { + static function main() { + return [ + for (meta in node.metadata) { + var child = node.children[meta - 1]; + if (child == null) 0 else value(child); + } + ].sum(); + } + + static function main() { + [ + if (foo) bar else foo, + if (foo) bar else foo, + if (foo) bar else foo, + if (foo) bar else foo, + if (foo) bar else foo + ] + } +} diff --git a/test/testcases/wrapping/issue_675_map_literal_wrapping.hxtest b/test/testcases/wrapping/issue_675_map_literal_wrapping.hxtest new file mode 100644 index 0000000..30a0631 --- /dev/null +++ b/test/testcases/wrapping/issue_675_map_literal_wrapping.hxtest @@ -0,0 +1,34 @@ + { + "wrapping": { + "arrayWrap": { + "defaultWrap": "noWrap" + }, + "mapWrap": { + "defaultWrap": "onePerLine" + } + } +} + +--- + +class Main { + private var array:Array = ["a", "b", "c"]; + + private var map:Map = [ + "a" => "apple", + "b" => "bear", + "c" => "callsign" + ]; +} + +--- + +class Main { + private var array:Array = ["a", "b", "c"]; + + private var map:Map = [ + "a" => "apple", + "b" => "bear", + "c" => "callsign" + ]; +} diff --git a/testJava.hxml b/testJava.hxml index 1a8b817..1e347f7 100644 --- a/testJava.hxml +++ b/testJava.hxml @@ -16,10 +16,24 @@ # -D detailed_coverage # -D debugWrapping -D unittest --D jvm --java out +--jvm out/TestMain.jar -main TestMain --macro mcover.MCover.coverage(['formatter'], ['src'], ['formatter.Cli']) +# -lib instrument +# # -D profiler-console-detail-reporter +# # -D profiler-console-missing-reporter +# # -D profiler-console-summary-reporter +# # -D profiler-console-hierarchy-reporter +# # -D profiler-csv-reporter +# # -D profiler-d3-reporter +# # -D coverage-console-summary-reporter +# -D coverage-console-package-summary-reporter +# # -D coverage-console-detail-reporter +# -D coverage-lcov-reporter +# -D coverage-codecov-reporter + +# --macro instrument.Instrumentation.coverage(['formatter'], ['src'], ['formatter.Cli', 'formatter.debug.PosInfosMacro']) + -cmd java -jar out/TestMain.jar