Skip to content

Commit 46ec9b9

Browse files
authored
Update README.md (#1885)
1 parent 74d62a9 commit 46ec9b9

File tree

1 file changed

+15
-40
lines changed

1 file changed

+15
-40
lines changed

README.md

Lines changed: 15 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,35 @@
88
[![Releases](https://img.shields.io/github/v/release/saveourtool/diKTat)](https://github.com/saveourtool/diKTat/releases)
99
[![Maven Central](https://img.shields.io/maven-central/v/com.saveourtool.diktat/diktat-rules)](https://mvnrepository.com/artifact/com.saveourtool.diktat)
1010
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fsaveourtool%2Fdiktat.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fsaveourtool%2Fdiktat?ref=badge_shield)
11-
[![Chat on Telegram](https://img.shields.io/badge/Chat%20on-Telegram-brightgreen.svg)](https://t.me/diktat_help)
11+
[![Chat on Telegram](https://img.shields.io/badge/Chat%20on-Telegram-brightgreen.svg)](https://t.me/diktat_support)
1212

1313
[![Hits-of-Code](https://hitsofcode.com/github/saveourtool/diktat)](https://hitsofcode.com/view/github/saveourtool/diktat)
1414
![Lines of code](https://img.shields.io/tokei/lines/github/saveourtool/diktat)
1515
![GitHub repo size](https://img.shields.io/github/repo-size/saveourtool/diktat)
1616
[![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin)
1717

1818

19-
DiKTat is a strict [coding standard ](info/guide/diktat-coding-convention.md) for Kotlin and a collection of [Kotlin](https://kotlinlang.org/) code style rules implemented
20-
as AST visitors on the top of [KTlint](https://ktlint.github.io/). It can be used for detecting and autofixing code smells in CI/CD process.
21-
The full list of available supported rules and inspections can be found [here](info/available-rules.md).
19+
**DiKTat** is a strict [coding standard](info/guide/diktat-coding-convention.md) for Kotlin, consisting of a collection of [Kotlin](https://kotlinlang.org/) code style rules implemented as Abstract Syntax Tree (AST) visitors built on top of [KTlint](https://ktlint.github.io/). It serves the purpose of detecting and automatically fixing code smells in the Continuous Integration/Continuous Deployment (CI/CD) process. You can find the comprehensive list of supported rules and inspections [here](info/available-rules.md).
2220

23-
Now diKTat was already added to the lists of [static analysis tools](https://github.com/analysis-tools-dev/static-analysis), to [kotlin-awesome](https://github.com/KotlinBy/awesome-kotlin) and to [kompar](https://catalog.kompar.tools/Analyzer/diKTat/1.2.5). Thanks to the community for this support!
21+
DiKTat has gained recognition and has been added to the lists of [static analysis tools](https://github.com/analysis-tools-dev/static-analysis), [kotlin-awesome](https://github.com/KotlinBy/awesome-kotlin), and [kompar](https://catalog.kompar.tools/Analyzer/diKTat/1.2.5). We extend our gratitude to the community for this support!
2422

2523
## See first
2624

2725
| | | | | | |
2826
| --- | --- | --- | --- | --- | --- |
2927
|[Codestyle](info/guide/diktat-coding-convention.md)|[Inspections](info/available-rules.md) | [Examples](examples) | [Demo](https://saveourtool.com/#/demo/diktat) | [White Paper](wp/wp.pdf) | [Groups of Inspections](info/rules-mapping.md) |
3028

31-
## Why should I use diktat in my CI/CD?
29+
## Why Choose DiKTat for CI/CD?
3230

33-
There are several tools like `detekt` and `ktlint` that are doing static analysis. Why do I need diktat?
31+
While there are other tools like `detekt` and `ktlint` performing static analysis, you might wonder why DiKTat is necessary. Here are the key reasons:
3432

35-
First of all - actually you can combine diktat with any other static analyzers. And diKTat is even using ktlint framework for parsing the code into the AST.
36-
Main features of diktat are the following:
33+
1. **More Inspections:** DiKTat boasts over 100 inspections tightly coupled with its [Codestyle](info/guide/diktat-coding-convention.md).
3734

38-
1) **More inspections.** It has 100+ inspections that are tightly coupled with it's [Codestyle](info/guide/diktat-coding-convention.md).
35+
2. **Unique Inspections:** DiKTat introduces unique inspections not found in other linters.
3936

40-
2) **Unique [Inspections](info/available-rules.md)** that are missing in other linters.
37+
3. **Highly Configurable:** Every inspection is highly configurable, allowing customization and suppression. Check [configuration options](#config) and [suppression](#suppress).
4138

42-
3) **Highly configurable**. Each and every inspection can be [configured](#config) or [suppressed](#suppress).
43-
44-
4) **Strict detailed [Codestyle](info/guide/diktat-coding-convention.md)** that you can adopt and use in your project.
39+
4. **Strict Codestyle:** DiKTat enforces a detailed [Codestyle](info/guide/diktat-coding-convention.md) that can be adopted and applied in your project.
4540

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

@@ -54,7 +49,7 @@ Main features of diktat are the following:
5449
curl -sSLO https://github.com/saveourtool/diktat/releases/download/v2.0.0/diktat && chmod a+x diktat
5550
```
5651

57-
2. _**For Windows only**_. Download diKTat.bat manually: [here](https://github.com/saveourtool/diktat/releases)
52+
_**For Windows only**_. Download diKTat.cmd manually: [here](https://github.com/saveourtool/diktat/releases)
5853

5954
### Run diKTat
6055

@@ -66,19 +61,17 @@ $ ./diktat "dir/your/dir/**/*.kt"
6661

6762
> _**On Windows**_
6863
> ```console
69-
> ./diktat.bat "dir/your/dir/**/*.kt"
64+
> diktat.bat "dir/your/dir/**/*.kt"
7065
> ```
7166
7267
To **autofix** all code style violations, use `--mode fix` option.
7368
7469
## Run with Maven using diktat-maven-plugin
7570
76-
You can see how it is configured in our examples for self-checks:
71+
You can see how it is configured in our examples:
7772
- [Single project](examples/maven/pom.xml)
7873
- [Multi-module project](examples/maven-multiproject/pom.xml)
7974
80-
If you use it and encounter any problems, feel free to open issues on [github](https://github.com/saveourtool/diktat/issues).
81-
8275
<details>
8376
<summary>Add this plugin to your pom.xml:</summary>
8477
@@ -200,20 +193,6 @@ plugins {
200193
> }
201194
> ```
202195
203-
Or use buildscript syntax:
204-
```kotlin
205-
buildscript {
206-
repositories {
207-
mavenCentral()
208-
}
209-
dependencies {
210-
classpath("com.saveourtool.diktat:diktat-gradle-plugin:2.0.0")
211-
}
212-
}
213-
214-
apply(plugin = "com.saveourtool.diktat")
215-
```
216-
217196
You can then configure diktat using `diktat` extension:
218197
```kotlin
219198
diktat {
@@ -243,10 +222,9 @@ diktat {
243222
}
244223
}
245224
```
246-
247225
</details>
248226

249-
You can run diktat checks using task `diktatCheck` and automatically fix errors with tasks `diktatFix`.
227+
You can run diktat checks using task `./gradlew diktatCheck` and automatically fix errors with task `./gradlew diktatFix`.
250228

251229
## Run with Spotless
252230
[Spotless](https://github.com/diffplug/spotless) is a linter aggregator.
@@ -367,10 +345,7 @@ with:
367345

368346
## <a name="config"></a> Customizations via `diktat-analysis.yml`
369347

370-
In KTlint, rules can be configured via `.editorconfig`, but
371-
this does not give a chance to customize or enable/disable
372-
each and every rule independently.
373-
That is why we have supported `diktat-analysis.yml` that can be easily
348+
In Diktat we have supported `diktat-analysis.yml` that can be easily
374349
changed and help in customization of your own rule set.
375350
It has simple fields:
376351
`name` — name of the rule,
@@ -458,7 +433,7 @@ To allow gradual adoption, diktat and ktlint support baseline mode. When running
458433
the baseline file will be generated. It is a xml file with a complete list of findings by the tool. On later invocations,
459434
only the findings that are not in the baseline file will be reported. Baseline can be activated with CLI flag:
460435
```bash
461-
java -jar ktlint -R diktat.jar --baseline=diktat-baseline.xml **/*.kt
436+
./diktat --baseline=diktat-baseline.xml **/*.kt
462437
```
463438
or with corresponding configuration options in maven or gradle plugins. Baseline report is intended to be added into the VCS,
464439
but it can be removed and re-generated later, if needed.

0 commit comments

Comments
 (0)