Files
detekt/docs/pages/gettingstarted/cli.md
Chao Zhang 6d7374bc40 Auto generate CLI options in docs (#3399)
* Auto generate CLI options

* Add tests for CliOptionsPrinter

* Update dangling URLs pointing to the old website (#3400)

* Include cli-options in markdown
2021-01-25 08:19:30 -08:00

1.3 KiB

title, keywords, sidebar, permalink, folder, summary
title keywords sidebar permalink folder summary
Run detekt using Command Line Interface cli cli.html gettingstarted

Install the cli

There are different ways to install the Command Line Interface (CLI):

MacOS, with Homebrew:

brew install detekt
detekt [options]

Any OS:

curl -sSLO https://github.com/detekt/detekt/releases/download/v{{ site.detekt_version }}/detekt-cli-{{ site.detekt_version }}.zip
unzip detekt-cli-{{ site.detekt_version }}.zip
./detekt-cli-{{ site.detekt_version }}/bin/detekt-cli --help

Use the cli

detekt will exit with one of the following exit codes:

Exit code Description
0 detekt ran normally and maxIssues count was not reached in BuildFailureReport.
1 An unexpected error occurred
2 MaxIssues count was reached in BuildFailureReport.
3 Invalid detekt configuration file detected.

The following parameters are shown when --help is entered.

{% include_relative cli-options.md %}