Skip to content

Commit

Permalink
Fix jcommander specific parameter parsing - #11
Browse files Browse the repository at this point in the history
  • Loading branch information
arturbosch committed Mar 23, 2017
1 parent 1addb6f commit 838ceb6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Main {
lateinit var project: Path

@Parameter(names = arrayOf("--filters", "-f"), description = "Path filters defined through regex with separator ';' (\".*test.*\").")
val filters: String? = null // Using a converter for List<PathFilter> resulted in a ClassCastException
var filters: String? = null // Using a converter for List<PathFilter> resulted in a ClassCastException

@Parameter(names = arrayOf("--config", "-c"), description = "Path to the config file (path/to/config.yml).",
converter = ExistingPathConverter::class)
Expand All @@ -32,16 +32,16 @@ class Main {
var reportDirectory: Path? = null

@Parameter(names = arrayOf("--rules", "-r"), description = "Extra paths to ruleset jars separated by ';'.")
val rules: String? = null
var rules: String? = null

@Parameter(names = arrayOf("--format"), description = "Enables formatting of source code. Cannot be used together with --config.")
val formatting: Boolean = false
var formatting: Boolean = false

@Parameter(names = arrayOf("--parallel"), description = "Enables parallel compilation of source files. Should only be used if the analyzing project has more than ~200 kotlin files.")
val parallel: Boolean = false
var parallel: Boolean = false

@Parameter(names = arrayOf("--useTabs"), description = "Tells the formatter that indentation with tabs are valid.")
val useTabs: Boolean = false
var useTabs: Boolean = false

@Parameter(names = arrayOf("--baseline", "-b"), description = "Treats current analysis findings as a smell baseline for further detekt runs. If a baseline xml file exists, only new code smells not in the baseline are printed in the console.")
var baseline: Boolean = false
Expand Down

0 comments on commit 838ceb6

Please sign in to comment.