Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup cli options #418

Merged
merged 1 commit into from
May 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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