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

Rewrote adoc to markdown #1867

Merged
merged 2 commits into from
Dec 15, 2023
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
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ Main features of diktat are the following:

4) **Strict detailed [Codestyle](info/guide/diktat-coding-convention.md)** that you can adopt and use in your project.

## Run as CLI-application

[Info](diktat-cli/diktat-cli.adoc)
## Run as [CLI-application](diktat-cli/README.md)

### Download binary

Expand Down
49 changes: 49 additions & 0 deletions diktat-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# _diktat-cli_, the command-line client for [_diktat_](https://github.com/saveourtool/diktat)

---

# Table of contents
1. [Features](#features)
2. [Usage](#usage)
3. [Option summary](#option-summary)
4. [Exit code](#exit-codes)

---

## Features

* Self-executable JAR in _UNIX Shell_ (requires installed _JAVA_)
* BSD-compatible
* Also works in Windows (_Git Bash_, _Cygwin_, or _MSys2_) via the dedicated _diktat.cmd_
* Can be used as a regular uber JAR

## Usage

```shell
diktat [OPTION]... [FILE]...
```

## Option summary

| Command-line switch | Meaning |
|:-------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `-c CONFIG`, `--config=CONFIG` | Specify the location of the YAML configuration file. By default, `diktat-analysis.yml` in the current directory is used. |
| `-m MODE`, `--mode MODE` | Mode of `diktat` controls that `diktat` fixes or only finds any deviations from the code style. |
| `-r REPORTER`, `--reporter=REPORTER` | The reporter to use to errors to `output`, one of: `plain`, `plain_group_by_file`, `json`, `sarif`, `checkstyle`, `html`. |
| `-o OUTPUT`, `--output=OUTPUT` | Redirect the reporter output to a file. Must be provided when the reporter is provided. |
| `--group-by-file` | A flag to group found errors by files. |
| `--color COLOR` | Colorize the output, one of: `BLACK`, `RED`, `GREEN`, `YELLOW`, `BLUE`, `MAGENTA`, `CYAN`, `LIGHT_GRAY`, `DARK_GRAY`, `LIGHT_RED`, `LIGHT_GREEN`, `LIGHT_YELLOW`, `LIGHT_BLUE`, `LIGHT_MAGENTA`, `LIGHT_CYAN`, `WHITE` |
| `-l`, `--log-level` | Control the log level. |
| `-h`, `--help` | Display the help text and exit. |
| `-l`, `--license` | Display the license and exit. |
| `-v`, `--verbose` | Enable the verbose output. |
| `-V`, `--version` | Output version information and exit. |

## Exit codes

| Exit code | Meaning |
|:----------|:--------------------------------------------------------------------------------------------------------------------|
| 0 | _diKTat_ found no errors in your code |
| 1 | _diKTat_ reported some errors in your code |
| 2 | The JVM was not found (probably, you need to set up the JVM explicitly, using the `JAVA_HOME` environment variable) |
| 3 | Incompatible _Bash_ version |
89 changes: 0 additions & 89 deletions diktat-cli/diktat-cli.adoc

This file was deleted.

Loading