Skip to content

Commit

Permalink
cleanup cli options (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe authored May 13, 2018
1 parent 34e2757 commit 9a5e5b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- Improved automatic detection of coding style by not stopping at the first change in number of violations [#415](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/415)
- Improved handling of file content and `class` parsing in TokenTree [#413](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/413)
- Refactored handling of internal errors (parsing and checks) [#413](https://github.com/HaxeCheckstyle/haxe-checkstyle/issues/413)
- Cleanup command line options

## version 2.3.0 (2018-05-07)

Expand Down
15 changes: 7 additions & 8 deletions src/checkstyle/Main.hx
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,18 @@ class Main {
TEXT_PATH = path;
},
@doc("Set reporter style (XSLT)") ["-x", "--xslt"] => function(style:String) STYLE = style,
@doc("Show percentage progress") ["-progress"] => function() SHOW_PROGRESS = true,
@doc("Sets the number of checker threads") ["-checkerthreads"] => function (num:Int) overrideCheckerThreads = num,
@doc("Generate a default config and exit") ["-default-config", "--default-config"] => function(path) generateDefaultConfig(path),
@doc("Try to detect your coding style (experimental)") ["-detect"] => function (path) detectCodingStyle(path),
@doc("Return number of failed checks in exitcode") ["-exitcode"] => function() EXIT_CODE = true,
@doc("List all available checks and exit") ["--list-checks"] => function() listChecks(),
@doc("List all available reporters and exit") ["--list-reporters"] => function() listReporters(),
@doc("Generate a default config and exit") ["--default-config"] => function(path) generateDefaultConfig(path),
@doc("List all available checks and exit") ["-list-checks", "--list-checks"] => function() listChecks(),
@doc("List all available reporters and exit") ["-list-reporters", "--list-reporters"] => function() listReporters(),
@doc("Omit styling in output summary") ["-nostyle"] => function() NO_STYLE = true,
@doc("Show checks missing from active config") ["-show-missing-checks"] => function () SHOW_MISSING_CHECKS = true,
@doc("Sets the number of checker threads") ["-checkerthreads"] => function (num:Int) overrideCheckerThreads = num,
@doc("Do not use checker threads") ["-nothreads"] => function () disableThreads = true,
@doc("Try to detect your coding style (experimental)") ["-detect"] => function (path) detectCodingStyle(path),
@doc("Show percentage progress") ["-progress"] => function() SHOW_PROGRESS = true,
@doc("Show checks missing from active config") ["-show-missing-checks"] => function () SHOW_MISSING_CHECKS = true,
@doc("Adds error messages for files that checkstyle fails to parse") ["-show-parser-errors"] => function ()
ReporterManager.SHOW_PARSE_ERRORS = true,
@doc("Show report [DEPRECATED]") ["-report"] => function() Sys.println("\n-report is no longer needed."),
_ => function(arg:String) failWith("Unknown command: " + arg)
]);

Expand Down

0 comments on commit 9a5e5b7

Please sign in to comment.