Repository: cqfn/diKTat
Pull request #391 (2020-10-13 08:00:24)

Update versions in pom.xml and documentation after 0.1.2 release
* Versions are updated in pom.xml, README.md and build.gradle.kts
* Current project version is incremented to the next snapshot

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

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

```diff
@@            Coverage Diff            @@
##             master     #391   +/-   ##
=========================================
  Coverage     83.09%   83.09%           
  Complexity     1289     1289           
=========================================
  Files            64       64           
  Lines          3147     3147           
  Branches        999      999           
=========================================
  Hits           2615     2615           
  Misses          168      168           
  Partials        364      364           
```

| Flag | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| #unittests | `83.09% <ø> (ø)` | `1289.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/391?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/391?src=pr&el=footer). Last update [d88c1ba...deae4d9](https://codecov.io/gh/cqfn/diKTat/pull/391?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/.github/workflows/diktat.yml b/.github/workflows/diktat.yml
index 72af43ee..f59b58da 100644
--- a/.github/workflows/diktat.yml
+++ b/.github/workflows/diktat.yml
@@ -23,6 +23,5 @@ jobs:
           key: ${{ runner.os }}-maven-diktat-${{ hashFiles('**/pom.xml') }}
           restore-keys: |
             ${{ runner.os }}-maven-diktat-
-      - name: Run diktat itself via ktlint
-        # fixme: change to diktat:check when diktat plugin is released
-        run: mvn -B antrun:run@diktat
+      - name: Run diktat via maven plugin
+        run: mvn -B diktat:check@diktat
diff --git a/README.md b/README.md
index 7d528282..5d6cc735 100644
--- a/README.md
+++ b/README.md
@@ -36,11 +36,11 @@ The full list of available supported rules and inspections is [here](info/availa
     # another option is "brew install ktlint"
     ```
    
-2. Load diKTat manually: [here](https://github.com/cqfn/diKTat/releases/download/v0.1.1/diktat.jar)
+2. Load diKTat manually: [here](https://github.com/cqfn/diKTat/releases/download/v0.1.2/diktat.jar)
 
    **OR** use curl:
    ```bash
-   $ curl -sSLO https://github.com/cqfn/diKTat/releases/download/v0.1.1/diktat-0.1.1.jar
+   $ curl -sSLO https://github.com/cqfn/diKTat/releases/download/v0.1.2/diktat-0.1.2.jar
    ```
    
 3. Finally, run KTlint (with diKTat injected) to check your `*.kt` files in `dir/your/dir`:
@@ -100,7 +100,7 @@ Add this plugin to your pom.xml:
               <dependency>
                   <groupId>org.cqfn.diktat</groupId>
                   <artifactId>diktat-rules</artifactId>
-                  <version>0.1.1</version> <!-- replace it with diktat latest version -->
+                  <version>0.1.2</version> <!-- replace it with diktat latest version -->
                   <exclusions>
                       <exclusion>
                           <groupId>org.slf4j</groupId>
@@ -125,8 +125,7 @@ To run diktat to check/fix code style - run `$ mvn antrun:run@diktat`.
 ### Use the new diktat-maven-plugin
 
 You can see how it is configured in our project for self-checks: [pom.xml](pom.xml).
-This plugin should be available since version 0.1.2. It requires less configuration but may contain bugs.
-If you use it and encounter any problems, feel free to open issues on [github](https://github.com/cqfn/diktat/issues).
+This plugin is available since version 0.1.2. If you use it and encounter any problems, feel free to open issues on [github](https://github.com/cqfn/diktat/issues).
 
 Add this plugin to your pom.xml:
 <details>
@@ -179,7 +178,7 @@ dependencies {
     }
 
     // diktat ruleset
-    ktlint("org.cqfn.diktat:diktat-rules:0.1.1")
+    ktlint("org.cqfn.diktat:diktat-rules:0.1.2")
 }
 
 val outputDir = "${project.buildDir}/reports/diktat/"
diff --git a/build.gradle.kts b/build.gradle.kts
index 0fd2c655..f1c7a419 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,7 +11,7 @@ dependencies {
     }
 
     // diktat ruleset
-    ktlint("org.cqfn.diktat:diktat-rules:0.1.1")
+    ktlint("org.cqfn.diktat:diktat-rules:0.1.2")
 }
 
 val outputDir = "${project.buildDir}/reports/diktat/"
diff --git a/diktat-common/pom.xml b/diktat-common/pom.xml
index db1168e8..d0e53851 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.2-SNAPSHOT</version>
+        <version>0.1.3-SNAPSHOT</version>
     </parent>
 
     <dependencies>
diff --git a/diktat-maven-plugin/pom.xml b/diktat-maven-plugin/pom.xml
index 6058426c..14dcad8d 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.2-SNAPSHOT</version>
+        <version>0.1.3-SNAPSHOT</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
diff --git a/diktat-rules/pom.xml b/diktat-rules/pom.xml
index 88351822..73887786 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.2-SNAPSHOT</version>
+        <version>0.1.3-SNAPSHOT</version>
 
     </parent>
     <properties>
diff --git a/diktat-ruleset/pom.xml b/diktat-ruleset/pom.xml
index 91944d49..0eded697 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.2-SNAPSHOT</version>
+        <version>0.1.3-SNAPSHOT</version>
     </parent>
 
     <dependencies>
diff --git a/pom.xml b/pom.xml
index f6a529ad..3ef76424 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
 
     <groupId>org.cqfn.diktat</groupId>
     <artifactId>diktat-parent</artifactId>
-    <version>0.1.2-SNAPSHOT</version>
+    <version>0.1.3-SNAPSHOT</version>
     <packaging>pom</packaging>
 
     <name>diktat</name>
@@ -49,7 +49,7 @@
         <jackson.version>2.11.3</jackson.version>
         <slf4j.version>1.7.30</slf4j.version>
         <commons-cli.version>1.4</commons-cli.version>
-        <diktat-check.version>0.1.1</diktat-check.version>
+        <diktat-check.version>0.1.2</diktat-check.version>
         <kotlinpoet.version>1.6.0</kotlinpoet.version>
         <detekt.version>1.14.0</detekt.version>
         <dokka.version>1.4.10</dokka.version>
@@ -350,67 +350,6 @@
                 </executions>
             </plugin>
 
-            <!-- todo: remove antrun completely after diktat-maven-plugin is released -->
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <version>3.0.0</version>
-                <executions>
-                    <execution>
-                        <id>diktat</id>
-                        <phase>none</phase>
-                        <configuration>
-                            <target name="ktlint">
-                                <java taskname="ktlint" dir="${maven.multiModuleProjectDirectory}" fork="true"
-                                      failonerror="true"
-                                      classpathref="maven.plugin.classpath" classname="com.pinterest.ktlint.Main">
-                                    <arg value="${project.basedir}/src/main/kotlin/**/*.kt"/>
-                                    <arg value="${project.basedir}/src/test/kotlin/**/*.kt"/>
-                                </java>
-                            </target>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                    <execution>
-                        <id>functional-test</id>
-                        <phase>none</phase>
-                        <inherited>false</inherited>
-                        <configuration>
-                            <target name="ktlint">
-                                <java taskname="ktlint" dir="${maven.multiModuleProjectDirectory}" fork="true"
-                                      failonerror="true"
-                                      classpathref="maven.plugin.classpath" classname="com.pinterest.ktlint.Main">
-                                    <arg value="diktat-rules/src/test/resources/test/funcTest/*.kt"/>
-                                </java>
-                            </target>
-                        </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>com.pinterest</groupId>
-                        <artifactId>ktlint</artifactId>
-                        <version>${ktlint.version}</version>
-                        <exclusions>
-                            <exclusion>
-                                <groupId>com.pinterest.ktlint</groupId>
-                                <artifactId>ktlint-ruleset-standard</artifactId>
-                            </exclusion>
-                        </exclusions>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.cqfn.diktat</groupId>
-                        <artifactId>diktat-rules</artifactId>
-                        <version>${diktat-check.version}</version>
-                    </dependency>
-                </dependencies>
-            </plugin>
-
             <plugin>
                 <groupId>org.jacoco</groupId>
                 <artifactId>jacoco-maven-plugin</artifactId>


Test patch:
diff --git a/.github/workflows/functional_tests.yml b/.github/workflows/functional_tests.yml
index 6b87f95e..146af2f1 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.0
+  DIKTAT_VERSION: 0.1.2
   KTLINT_VERSION: 0.37.1
 
 jobs:
@@ -43,8 +43,7 @@ jobs:
 
       - name: Run diKTat from maven
         continue-on-error: true
-        # fixme: change to diktat:check when diktat plugin is released
-        run: mvn -B antrun:run@functional-test &> out
+        run: mvn -B diktat:check@functional-test &> out
 
       - name: Check maven
         run: |
diff --git a/diktat-test-framework/pom.xml b/diktat-test-framework/pom.xml
index bbdf32a7..d5360952 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.2-SNAPSHOT</version>
+        <version>0.1.3-SNAPSHOT</version>
     </parent>
 
     <dependencies>