diff --git a/README.md b/README.md index 1d893a3628..9052f39384 100644 --- a/README.md +++ b/README.md @@ -269,6 +269,19 @@ class SomeClass { } } ``` + +## Suppress groups of inspections +It is easy to suppress even groups of inspections in diKTat. + +These groups are linked to chapters of [Codestyle](info/guide/diktat-coding-convention.md). + +To disable chapters, you will need to add the following configuration to common configuration (`- name: DIKTAT_COMMON`): +```yaml + disabledChapters: "1, 2, 3" +``` + +Mapping of inspections to chapters can be found in [Groups of Inspections](info/rules-mapping.md) . + ## How to contribute? Main components are: diff --git a/diktat-analysis.yml b/diktat-analysis.yml index fd509c66d0..e893badf57 100644 --- a/diktat-analysis.yml +++ b/diktat-analysis.yml @@ -5,6 +5,9 @@ # put your package name here - it will be autofixed and checked domainName: org.cqfn.diktat # testDirs: test + # can also use chapter names here (not only numbers) + # expected values: disabledChapters: "Naming, Comments, General, Variables, Functions, Classes" + # or: "1, 2, 3, 4, 5, 6" disabledChapters: "" testDirs: test kotlinVersion: 1.5 diff --git a/diktat-gradle-plugin/README.md b/diktat-gradle-plugin/README.md index 0d62b8ad2d..c3deb5aa78 100644 --- a/diktat-gradle-plugin/README.md +++ b/diktat-gradle-plugin/README.md @@ -6,4 +6,11 @@ To avoid versions duplication, diktat and ktlint versions are passed to gradle v These versions are then written in a file and then included in the plugin jar to determine dependencies for JavaExec. Gradle plugin marker pom, which is normally produced by `java-gradle-plugin` plugin during gradle build, -is added manually as a maven module. \ No newline at end of file +is added manually as a maven module. + +Please be advised that to run functional tests of Gradle plugin you will need to have Java 11 or **older**. +This does not affect the plugin itself and only affect functional tests : +``` +Starting Build +java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7 +``` diff --git a/diktat-rules/src/main/resources/diktat-analysis.yml b/diktat-rules/src/main/resources/diktat-analysis.yml index 8e7e65a3f4..41b41375b3 100644 --- a/diktat-rules/src/main/resources/diktat-analysis.yml +++ b/diktat-rules/src/main/resources/diktat-analysis.yml @@ -4,6 +4,8 @@ # put your package name here - it will be autofixed and checked domainName: your.name.here testDirs: test + # expected values: disabledChapters: "Naming, Comments, General, Variables, Functions, Classes" + # or: "1, 2, 3, 4, 5, 6" disabledChapters: "" kotlinVersion: 1.5 srcDirectories: "main"