Skip to content

Commit

Permalink
Provide cli information for baseline.xml (#6959)
Browse files Browse the repository at this point in the history
* Provide cli information

* Add create baseline documentation for CLI

* Update baseline.md

* Update baseline.md

* Update baseline.md

* Update baseline.md

* Update baseline.md

* Use h4 for cli correct filename and path to match rest of page

* Update website/docs/introduction/baseline.md

* Update website/versioned_docs/version-1.23.5/introduction/baseline.md

---------

Co-authored-by: Nicola Corti <corti.nico@gmail.com>
  • Loading branch information
madlymad and cortinico committed Mar 23, 2024
1 parent beb9e9e commit 8a3eac5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
11 changes: 11 additions & 0 deletions website/docs/introduction/baseline.md
Expand Up @@ -29,6 +29,17 @@ the `--report txt:path/to/report` cli flag.
</SmellBaseline>
```

#### CLI
To generate yourself a `baseline.xml` you need to provide the same config as the the rules you are going to scan your project.

```diff
java -jar detekt-cli-all.jar \
--plugins detekt-formatting.jar \
--build-upon-default-config \
--config path/to/config/detekt/detekt.yml \
+ --baseline path/to/new/config/detekt/baseline.xml \
+ --create-baseline

#### Gradle

If you are using the gradle-plugin run the `detektBaseline` task to generate yourself a `baseline.xml`.
Expand Down
11 changes: 11 additions & 0 deletions website/versioned_docs/version-1.23.5/introduction/baseline.md
Expand Up @@ -29,6 +29,17 @@ the `--report txt:path/to/report` cli flag.
</SmellBaseline>
```

#### CLI
To generate yourself a `baseline.xml` you need to provide the same config as the the rules you are going to scan your project.

```diff
java -jar detekt-cli-all.jar \
--plugins detekt-formatting.jar \
--build-upon-default-config \
--config path/to/config/detekt/detekt.yml \
+ --baseline path/to/new/config/detekt/baseline.xml \
+ --create-baseline

#### Gradle

If you are using the gradle-plugin run the `detektBaseline` task to generate yourself a `baseline.xml`.
Expand Down

0 comments on commit 8a3eac5

Please sign in to comment.