Repository: cqfn/diKTat
Pull request #624 (2020-12-09 10:03:39)

Update versions in pom.xml and documentation after release 0.1.6
### What's done:
* Versions are updated in pom.xml, README.md and examples
* Current project version is incremented to the next snapshot
* Fixed release.yml

codecov[bot]: # [Codecov](https://codecov.io/gh/cqfn/diKTat/pull/624?src=pr&el=h1) Report
> Merging [#624](https://codecov.io/gh/cqfn/diKTat/pull/624?src=pr&el=desc) (d313b0a) into [master](https://codecov.io/gh/cqfn/diKTat/commit/d2223c5e993f9b257de9f3f5dbbdbdc3ad4937fa?el=desc) (d2223c5) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/cqfn/diKTat/pull/624/graphs/tree.svg?width=650&height=150&src=pr&token=P2quRDffpt)](https://codecov.io/gh/cqfn/diKTat/pull/624?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##             master     #624   +/-   ##
=========================================
  Coverage     80.76%   80.76%           
  Complexity     1748     1748           
=========================================
  Files            89       89           
  Lines          4612     4612           
  Branches       1391     1391           
=========================================
  Hits           3725     3725           
  Misses          320      320           
  Partials        567      567           
```

| Flag | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| unittests | `80.76% <ø> (ø)` | `0.00 <ø> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.


------

[Continue to review full report at Codecov](https://codecov.io/gh/cqfn/diKTat/pull/624?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/cqfn/diKTat/pull/624?src=pr&el=footer). Last update [d2223c5...d9339a9](https://codecov.io/gh/cqfn/diKTat/pull/624?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 4fffc01f..798ffdbf 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -72,12 +72,11 @@ jobs:
         run: |
           mvn -B versions:set -DnextSnapshot=true -DprocessAllModules=true versions:commit
           mvn versions:set-property -Dproperty=diktat-check.version -DnewVersion=${{ env.RELEASE_VERSION }}
-          sed -i "s/$PREVIOUS_VERSION/$RELEASE_VERSION/g" README.md
-          sed -i "s/$PREVIOUS_VERSION/$RELEASE_VERSION/g" build.gradle.kts
-          sed -i "s/$PREVIOUS_VERSION/$RELEASE_VERSION/g" .github/workflows/functional_tests.yml
+          sed -i "s/$PREVIOUS_VERSION/$RELEASE_VERSION/g" README.md || echo "File README.md hasn't been updated!"
+          sed -i "s/$PREVIOUS_VERSION/$RELEASE_VERSION/g" .github/workflows/functional_tests.yml || echo "File functional_tests.yml hasn't been updated!"
           for file in examples/maven/pom.xml examples/gradle-groovy-dsl/build.gradle examples/gradle-kotlin-dsl/build.gradle.kts
           do
-            sed -i "s/$PREVIOUS_VERSION/$RELEASE_VERSION/g" $file
+            sed -i "s/$PREVIOUS_VERSION/$RELEASE_VERSION/g" $file || echo "File $file hasn't been updated!"
             cp diktat-rules/src/main/resources/diktat-analysis.yml $(dirname $file)
           done
       - name: Create pull request
@@ -88,6 +87,6 @@ jobs:
           branch: infra/diktat-version-update-to-${{ env.RELEASE_VERSION }}
           title: Update versions in pom.xml and documentation after ${{ env.RELEASE_VERSION }} release
           body: |
-            * Versions are updated in pom.xml, README.md and build.gradle.kts
+            * Versions are updated in pom.xml, README.md and in examples
             * Current project version is incremented to the next snapshot
           base: master
diff --git a/README.md b/README.md
index 3c958f81..7a287c50 100644
--- a/README.md
+++ b/README.md
@@ -55,11 +55,11 @@ Main features of diktat are the following:
     # another option is "brew install ktlint"
     ```
    
-2. Load diKTat manually: [here](https://github.com/cqfn/diKTat/releases/download/v0.1.5/diktat.jar)
+2. Load diKTat manually: [here](https://github.com/cqfn/diKTat/releases/download/v0.1.6/diktat.jar)
 
    **OR** use curl:
    ```bash
-   $ curl -sSLO https://github.com/cqfn/diKTat/releases/download/v0.1.5/diktat-0.1.5.jar
+   $ curl -sSLO https://github.com/cqfn/diKTat/releases/download/v0.1.6/diktat-0.1.6.jar
    ```
    
 3. Finally, run KTlint (with diKTat injected) to check your `*.kt` files in `dir/your/dir`:
@@ -110,7 +110,7 @@ This plugin is available since version 0.1.5. You can see how the plugin is conf
 Add this plugin to your `build.gradle.kts`:
 ```kotlin
 plugins {
-    id("org.cqfn.diktat.diktat-gradle-plugin") version "0.1.5"
+    id("org.cqfn.diktat.diktat-gradle-plugin") version "0.1.6"
 }
 ```
 
@@ -121,7 +121,7 @@ buildscript {
         mavenCentral()
     }
     dependencies {
-        classpath("org.cqfn.diktat:diktat-gradle-plugin:0.1.5")
+        classpath("org.cqfn.diktat:diktat-gradle-plugin:0.1.6")
     }
 }
 
diff --git a/diktat-common/pom.xml b/diktat-common/pom.xml
index 83d4089a..97156d5f 100644
--- a/diktat-common/pom.xml
+++ b/diktat-common/pom.xml
@@ -9,7 +9,7 @@
     <parent>
         <groupId>org.cqfn.diktat</groupId>
         <artifactId>diktat-parent</artifactId>
-        <version>0.1.6-SNAPSHOT</version>
+        <version>0.1.7-SNAPSHOT</version>
     </parent>
 
     <dependencies>
diff --git a/diktat-gradle-plugin/build.gradle.kts b/diktat-gradle-plugin/build.gradle.kts
index 5884c5c1..6d75f034 100644
--- a/diktat-gradle-plugin/build.gradle.kts
+++ b/diktat-gradle-plugin/build.gradle.kts
@@ -17,7 +17,7 @@ repositories {
 
 // default value is needed for correct gradle loading in IDEA; actual value from maven is used during build
 val ktlintVersion = project.properties.getOrDefault("ktlintVersion", "0.39.0") as String
-val diktatVersion = project.version.takeIf { it.toString() != Project.DEFAULT_VERSION } ?: "0.1.5"
+val diktatVersion = project.version.takeIf { it.toString() != Project.DEFAULT_VERSION } ?: "0.1.6"
 val junitVersion = project.properties.getOrDefault("junitVersion", "5.7.0") as String
 dependencies {
     implementation(kotlin("gradle-plugin-api"))
diff --git a/diktat-gradle-plugin/gradle-plugin-marker/pom.xml b/diktat-gradle-plugin/gradle-plugin-marker/pom.xml
index f1ec938e..01a3ad8f 100644
--- a/diktat-gradle-plugin/gradle-plugin-marker/pom.xml
+++ b/diktat-gradle-plugin/gradle-plugin-marker/pom.xml
@@ -4,7 +4,7 @@
     <parent>
         <artifactId>diktat-gradle-plugin</artifactId>
         <groupId>org.cqfn.diktat</groupId>
-        <version>0.1.6-SNAPSHOT</version>
+        <version>0.1.7-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
diff --git a/diktat-gradle-plugin/pom.xml b/diktat-gradle-plugin/pom.xml
index 27ffb001..bc804153 100644
--- a/diktat-gradle-plugin/pom.xml
+++ b/diktat-gradle-plugin/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <artifactId>diktat-parent</artifactId>
         <groupId>org.cqfn.diktat</groupId>
-        <version>0.1.6-SNAPSHOT</version>
+        <version>0.1.7-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
diff --git a/diktat-maven-plugin/pom.xml b/diktat-maven-plugin/pom.xml
index b531f839..1d0e1c4e 100644
--- a/diktat-maven-plugin/pom.xml
+++ b/diktat-maven-plugin/pom.xml
@@ -5,7 +5,7 @@
     <parent>
         <artifactId>diktat-parent</artifactId>
         <groupId>org.cqfn.diktat</groupId>
-        <version>0.1.6-SNAPSHOT</version>
+        <version>0.1.7-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
diff --git a/diktat-rules/pom.xml b/diktat-rules/pom.xml
index 575060b8..63d55dc7 100644
--- a/diktat-rules/pom.xml
+++ b/diktat-rules/pom.xml
@@ -9,7 +9,7 @@
     <parent>
         <groupId>org.cqfn.diktat</groupId>
         <artifactId>diktat-parent</artifactId>
-        <version>0.1.6-SNAPSHOT</version>
+        <version>0.1.7-SNAPSHOT</version>
     </parent>
 
     <properties>
diff --git a/diktat-ruleset/pom.xml b/diktat-ruleset/pom.xml
index f1957b4a..97b85865 100644
--- a/diktat-ruleset/pom.xml
+++ b/diktat-ruleset/pom.xml
@@ -8,7 +8,7 @@
     <parent>
         <groupId>org.cqfn.diktat</groupId>
         <artifactId>diktat-parent</artifactId>
-        <version>0.1.6-SNAPSHOT</version>
+        <version>0.1.7-SNAPSHOT</version>
     </parent>
 
     <dependencies>
diff --git a/examples/gradle-groovy-dsl/build.gradle b/examples/gradle-groovy-dsl/build.gradle
index 35da1ddf..853bc677 100644
--- a/examples/gradle-groovy-dsl/build.gradle
+++ b/examples/gradle-groovy-dsl/build.gradle
@@ -1,5 +1,5 @@
 plugins {
-    id "org.cqfn.diktat.diktat-gradle-plugin" version "0.1.5"
+    id "org.cqfn.diktat.diktat-gradle-plugin" version "0.1.6"
 }
 
 repositories {
diff --git a/examples/gradle-groovy-dsl/diktat-analysis.yml b/examples/gradle-groovy-dsl/diktat-analysis.yml
index 17d166c0..05983b1d 100644
--- a/examples/gradle-groovy-dsl/diktat-analysis.yml
+++ b/examples/gradle-groovy-dsl/diktat-analysis.yml
@@ -254,6 +254,9 @@
 # Checks that KDoc in constructor has property tag
 - name: KDOC_NO_CONSTRUCTOR_PROPERTY
   enabled: true
+# Checks that property in KDoc present in class
+- name: KDOC_EXTRA_PROPERTY
+  enabled: true
 # Checks that KDoc in constructor has property tag but with comment inside constructor
 - name: KDOC_NO_CONSTRUCTOR_PROPERTY_WITH_COMMENT
   enabled: true
@@ -298,3 +301,14 @@
 # Checks if extension function with the same signature don't have related classes
 - name: EXTENSION_FUNCTION_SAME_SIGNATURE
   enabled: true
+# Checks if there is empty primary constructor
+- name: EMPTY_PRIMARY_CONSTRUCTOR
+  enabled: true
+# In case of not using field keyword in property accessors,
+# there should be explicit backing property with the name of real property
+# Example: val table get() {if (_table == null) ...} -> table should have _table
+- name: NO_CORRESPONDING_PROPERTY
+  enabled: true
+# Checks if there is class/object that can be replace with extension function
+- name: AVOID_USING_UTILITY_CLASS
+  enabled: true
\ No newline at end of file
diff --git a/examples/gradle-kotlin-dsl/build.gradle.kts b/examples/gradle-kotlin-dsl/build.gradle.kts
index bd6af41e..8f9c4a5d 100644
--- a/examples/gradle-kotlin-dsl/build.gradle.kts
+++ b/examples/gradle-kotlin-dsl/build.gradle.kts
@@ -1,5 +1,5 @@
 plugins {
-    id("org.cqfn.diktat.diktat-gradle-plugin") version "0.1.5"
+    id("org.cqfn.diktat.diktat-gradle-plugin") version "0.1.6"
 }
 
 repositories {
diff --git a/examples/gradle-kotlin-dsl/diktat-analysis.yml b/examples/gradle-kotlin-dsl/diktat-analysis.yml
index 17d166c0..05983b1d 100644
--- a/examples/gradle-kotlin-dsl/diktat-analysis.yml
+++ b/examples/gradle-kotlin-dsl/diktat-analysis.yml
@@ -254,6 +254,9 @@
 # Checks that KDoc in constructor has property tag
 - name: KDOC_NO_CONSTRUCTOR_PROPERTY
   enabled: true
+# Checks that property in KDoc present in class
+- name: KDOC_EXTRA_PROPERTY
+  enabled: true
 # Checks that KDoc in constructor has property tag but with comment inside constructor
 - name: KDOC_NO_CONSTRUCTOR_PROPERTY_WITH_COMMENT
   enabled: true
@@ -298,3 +301,14 @@
 # Checks if extension function with the same signature don't have related classes
 - name: EXTENSION_FUNCTION_SAME_SIGNATURE
   enabled: true
+# Checks if there is empty primary constructor
+- name: EMPTY_PRIMARY_CONSTRUCTOR
+  enabled: true
+# In case of not using field keyword in property accessors,
+# there should be explicit backing property with the name of real property
+# Example: val table get() {if (_table == null) ...} -> table should have _table
+- name: NO_CORRESPONDING_PROPERTY
+  enabled: true
+# Checks if there is class/object that can be replace with extension function
+- name: AVOID_USING_UTILITY_CLASS
+  enabled: true
\ No newline at end of file
diff --git a/examples/maven/diktat-analysis.yml b/examples/maven/diktat-analysis.yml
index 17d166c0..05983b1d 100644
--- a/examples/maven/diktat-analysis.yml
+++ b/examples/maven/diktat-analysis.yml
@@ -254,6 +254,9 @@
 # Checks that KDoc in constructor has property tag
 - name: KDOC_NO_CONSTRUCTOR_PROPERTY
   enabled: true
+# Checks that property in KDoc present in class
+- name: KDOC_EXTRA_PROPERTY
+  enabled: true
 # Checks that KDoc in constructor has property tag but with comment inside constructor
 - name: KDOC_NO_CONSTRUCTOR_PROPERTY_WITH_COMMENT
   enabled: true
@@ -298,3 +301,14 @@
 # Checks if extension function with the same signature don't have related classes
 - name: EXTENSION_FUNCTION_SAME_SIGNATURE
   enabled: true
+# Checks if there is empty primary constructor
+- name: EMPTY_PRIMARY_CONSTRUCTOR
+  enabled: true
+# In case of not using field keyword in property accessors,
+# there should be explicit backing property with the name of real property
+# Example: val table get() {if (_table == null) ...} -> table should have _table
+- name: NO_CORRESPONDING_PROPERTY
+  enabled: true
+# Checks if there is class/object that can be replace with extension function
+- name: AVOID_USING_UTILITY_CLASS
+  enabled: true
\ No newline at end of file
diff --git a/examples/maven/pom.xml b/examples/maven/pom.xml
index 96a3500c..f6c091a6 100644
--- a/examples/maven/pom.xml
+++ b/examples/maven/pom.xml
@@ -12,7 +12,7 @@
             <plugin>
                 <groupId>org.cqfn.diktat</groupId>
                 <artifactId>diktat-maven-plugin</artifactId>
-                <version>0.1.5</version>
+                <version>0.1.6</version>
                 <configuration>
                     <diktatConfigFile>diktat-analysis.yml</diktatConfigFile>
                     <inputs>
diff --git a/pom.xml b/pom.xml
index ec7f3362..e78353c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>org.cqfn.diktat</groupId>
     <artifactId>diktat-parent</artifactId>
-    <version>0.1.6-SNAPSHOT</version>
+    <version>0.1.7-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>diktat</name>
@@ -50,7 +50,7 @@
         <guava.version>30.0-jre</guava.version>
         <slf4j.version>1.7.30</slf4j.version>
         <commons-cli.version>1.4</commons-cli.version>
-        <diktat-check.version>0.1.5</diktat-check.version>
+        <diktat-check.version>0.1.6</diktat-check.version>
         <kotlinpoet.version>1.7.1</kotlinpoet.version>
         <detekt.version>1.14.2</detekt.version>
         <dokka.version>1.4.20</dokka.version>


Test patch:
diff --git a/.github/workflows/functional_tests.yml b/.github/workflows/functional_tests.yml
index 01728aaf..2fab489f 100644
--- a/.github/workflows/functional_tests.yml
+++ b/.github/workflows/functional_tests.yml
@@ -7,7 +7,7 @@ on:
     branches: [ master ]
 
 env:
-  DIKTAT_VERSION: 0.1.5
+  DIKTAT_VERSION: 0.1.6
   KTLINT_VERSION: 0.39.0
   GRADLE_OPTS: -Dorg.gradle.daemon=false  # to speed up gradle run
 
diff --git a/diktat-test-framework/pom.xml b/diktat-test-framework/pom.xml
index bd6af4bc..ba240923 100644
--- a/diktat-test-framework/pom.xml
+++ b/diktat-test-framework/pom.xml
@@ -9,7 +9,7 @@
     <parent>
         <groupId>org.cqfn.diktat</groupId>
         <artifactId>diktat-parent</artifactId>
-        <version>0.1.6-SNAPSHOT</version>
+        <version>0.1.7-SNAPSHOT</version>
     </parent>
 
     <dependencies>