Skip to content

Commit df25e32

Browse files
authored
Add missing argument in CLI docs (#2921)
1 parent e35ccad commit df25e32

File tree

2 files changed

+6
-6
lines changed
  • documentation
    • release-latest/docs/install
    • snapshot/docs/install

2 files changed

+6
-6
lines changed

documentation/release-latest/docs/install/cli.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ Some rules can be tweaked via the [`editorconfig file`](../../rules/configuratio
134134
A scaffold of the `.editorconfig` file can be generated with command below. Note: that the generated file only contains configuration settings which are actively used by the [rules which are loaded](#rule-sets):
135135

136136
```shell title="Generate .editorconfig"
137-
# Specify the code style(ktlint_official, intellij_idea or android_studio) to be used when generating the .editorconfig
138-
ktlint generateEditorConfig ktlint_official
137+
# Specify the code style (ktlint_official, intellij_idea or android_studio) to be used when generating the .editorconfig
138+
ktlint generateEditorConfig --code-style ktlint_official
139139
# or
140-
ktlint --ruleset=/path/to/custom-ruleset.jar generateEditorConfig android_studio
140+
ktlint --ruleset=/path/to/custom-ruleset.jar generateEditorConfig --code-style android_studio
141141
```
142142

143143
Normally the `.editorconfig` file is located in the root of your project directory. In case the file is located in a sub folder of the project, the settings of that file only applies to that subdirectory and its folders (recursively). Ktlint automatically detects and reads all `.editorconfig` files in your project.

documentation/snapshot/docs/install/cli.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ Some rules can be tweaked via the [`editorconfig file`](../../rules/configuratio
134134
A scaffold of the `.editorconfig` file can be generated with command below. Note: that the generated file only contains configuration settings which are actively used by the [rules which are loaded](#rule-sets):
135135

136136
```shell title="Generate .editorconfig"
137-
# Specify the code style(ktlint_official, intellij_idea or android_studio) to be used when generating the .editorconfig
138-
ktlint generateEditorConfig ktlint_official
137+
# Specify the code style (ktlint_official, intellij_idea or android_studio) to be used when generating the .editorconfig
138+
ktlint generateEditorConfig --code-style ktlint_official
139139
# or
140-
ktlint --ruleset=/path/to/custom-ruleset.jar generateEditorConfig android_studio
140+
ktlint --ruleset=/path/to/custom-ruleset.jar generateEditorConfig --code-style android_studio
141141
```
142142

143143
Normally the `.editorconfig` file is located in the root of your project directory. In case the file is located in a sub folder of the project, the settings of that file only applies to that subdirectory and its folders (recursively). Ktlint automatically detects and reads all `.editorconfig` files in your project.

0 commit comments

Comments
 (0)