You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ag...@apache.org on 2021/03/11 15:27:56 UTC

[ignite-3] branch main updated: IGNITE-14298 DEVNOTES should contain clear instructions on how to run check-style

This is an automated email from the ASF dual-hosted git repository.

agura pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new 4afdbb3  IGNITE-14298 DEVNOTES should contain clear instructions on how to run check-style
4afdbb3 is described below

commit 4afdbb3abd46832dfb7b0b4f7bf1b1b3397470ae
Author: Peter Ivanov <mr...@gmail.com>
AuthorDate: Thu Mar 11 18:25:36 2021 +0300

    IGNITE-14298 DEVNOTES should contain clear instructions on how to run check-style
    
    Signed-off-by: Andrey Gura <ag...@apache.org>
---
 DEVNOTES.md | 164 ++++++++++++++++++++++++++++++++++--------------------------
 pom.xml     |   1 +
 2 files changed, 93 insertions(+), 72 deletions(-)

diff --git a/DEVNOTES.md b/DEVNOTES.md
index 0185e9b..8e2ec9a 100644
--- a/DEVNOTES.md
+++ b/DEVNOTES.md
@@ -1,99 +1,119 @@
-# Setting up and building
+* [Prerequisites](#prerequisites)
+* [Building Ignite](#building-ignite)
+* [Running sanity checks](#running-sanity-checks)
+* [Running tests](#running-tests)
+* [Setting up IntelliJ Idea project](#setting-up-intellij-idea-project)
+* [Code structure](#code-structure)
+* [Release candidate verification](#release-candidate-verification)
+
+
 ## Prerequisites
  * Java 11 SDK
  * Maven 3.6.0+ (for building)
- 
-## Building Ignite
-Ignite follows standard guidelines for multi-module maven projects, so it can be easily built using the following 
-command from the project root directory (you can disable the tests when building using `-DskipTests`):
-
-    mvn clean install [-DskipTests]
-
-Upon completion, you will find the CLI tool under `modules/cli/target` directory.
-Use `ignite` on Linux and MacOS, or `ignite.exe` on Windows. 
-
-### Running tests
-To run unit tests only, use the following command:
-
-    mvn test
-
-Before running integration tests, make sure to build the project using the ``package`` target.
-
-To run unit + integration tests, use the following command:
 
-    mvn integration-test
 
-To run integration tests only, use the following command:
-
-    mvn integration-test -Dskip.surefire.tests=true
-    
-### Sanity check targets
-Use the following commands to run generic sanity checks before submitting a PR.
-
-RAT license validation:
-    
-    mvn validate
-    
-Checkstyle code validation:
-
-    mvn checkstyle:checkstyle:aggregate
-
-PMD static code analysis
-
-    mvn compile pmd:check 
+## Building Ignite
+Ignite follows standard guidelines for multi-module maven projects, so it can be easily built using the following command from the project root directory (you can disable the tests when building using `-DskipTests`):
+```
+mvn clean package [-DskipTests]
+```
+Upon build completion, CLI tool can be found be under `modules/cli/target` directory. Use `ignite` on Linux and MacOS, or `ignite.exe` on Windows.
+
+
+## Running sanity checks
+### Code style
+Code style is checked with [Apache Maven Checkstyle Plugin](https://maven.apache.org/plugins/maven-checkstyle-plugin/).
+
+[Checkstyle rules](check-rules/checkstyle-rules.xml).
+
+[Checkstyle suppressions](check-rules/checkstyle-suppressions.xml).
+```
+mvn clean checkstyle:checkstyle-aggregate
+```
+Code style check result is generated at `target/site/checkstyle-aggregate.html`
+
+### License headers
+Project files license headers match with required template is checked with [Apache Rat Maven Plugin](https://creadur.apache.org/rat/apache-rat-plugin/).
+```
+mvn clean apache-rat:check -pl :apache-ignite
+```
+License headers check result is generated at `target/rat.txt`
+
+### PMD
+Static code analyzer is run with [Apache Maven PMD Plugin](https://maven.apache.org/plugins/maven-pmd-plugin/). Precompilation is required 'cause PMD shoud be run on compiled code.
+
+[PMD rules](check-rules/pmd-rules.xml).
+```
+mvn clean compile pmd:check
+```
+PMD check result (only if there are any violations) is generated at `target/pmd.xml`.
+
+
+## Running tests
+Run unit tests only:
+```
+mvn test
+```
+Run unit + integration tests:
+```
+mvn integration-test
+```
+Run integration tests only:
+```
+mvn integration-test -Dskip.surefire.tests
+```
 
 
 ## Setting up IntelliJ Idea project
-You can quickly import Ignite project to your IDE using the root `pom.xml` file. In IntelliJ, choose `Open Project` 
-from the `Quick Start` box or choose `Open...` from the `File` menu and select the root `pom.xml` file.
+You can quickly import Ignite project to your IDE using the root `pom.xml` file. In IntelliJ, choose `Open Project` from the `Quick Start` box or choose `Open...` from the `File` menu and select the root `pom.xml` file.
 
 After opening the project in IntelliJ, double check that the Java SDK is properly configured for the project:
-
  * Open the `File` menu and select `Project Structure...`
  * In the SDKs section, ensure that a 1.11 JDK is selected (create one if none exist)
- * In the `Project` section, make sure the project language level is set to 11.0 as Ignite makes use of several Java 11 
+ * In the `Project` section, make sure the project language level is set to 11.0 as Ignite makes use of several Java 11
  language features
- 
-Ignite uses machine code generation for some of it's modules. To generate necessary production code, build the project
-using maven (see Building Ignite).
+
+Ignite uses machine code generation for some of it's modules. To generate necessary production code, build the project using maven (see [Building Ignite](#building-ignite)).
+
 
 ## Code structure
 High-level modules structure and detailed modules description can be found in the [modules readme](modules/README.md).
 
-## Release candidate verification
-
-**1. Build the package (this will also run unit tests and the license headers check)**
 
+## Release candidate verification
+1. Build the package (this will also run unit tests and the license headers check)
+    ```
     mvn clean package
-
-**2. Go to the `modules/cli/target` directory which now contains the packaged CLI tool**
-
+    ```
+1. Go to the `modules/cli/target` directory which now contains the packaged CLI tool
+    ```
     cd modules/cli/target
-
-**3. Run the tool without parameters (full list of available commands should appear)**
-
+    ```
+1. Run the tool without parameters (full list of available commands should appear)
+    ```
     ./ignite
-    
-**4. Run the initialization step**
-
+    ```
+1. Run the initialization step
+    ```
     ./ignite init --repo=<path to Maven staging repository>
-
-**5. Install an additional dependency (Guava is used as an example)**
-
+    ```
+1. Install an additional dependency (Guava is used as an example)
+    ```
     ./ignite module add mvn:com.google.guava:guava:23.0
-
-**6. Verify that Guava has been installed**
-
+    ```
+1. Verify that Guava has been installed
+    ```
     ./ignite module list
-
-**7. Start a node**
-
+    ```
+1. Start a node
+    ```
     ./ignite node start myFirstNode
-
-**8. Check that the new node is up and running**
-
+    ```
+1. Check that the new node is up and running
+    ```
     ./ignite node list
-    
-**9. Stop the node**
-
+    ```
+1. Stop the node
+    ```
     ./ignite node stop myFirstNode
+    ```
diff --git a/pom.xml b/pom.xml
index ade1018..bdbd263 100644
--- a/pom.xml
+++ b/pom.xml
@@ -90,6 +90,7 @@
                         <exclude>**/*.json</exclude> <!-- Files in JSON format -->
                         <exclude>modules/cli/src/**/resources//builtin_modules.conf</exclude> <!-- CLI configuration files -->
                         <exclude>modules/configuration-annotation-processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor</exclude> <!-- ? -->
+                        <exclude>**/*.iml</exclude> <!-- IntelliJ IDEA project files -->
                     </excludes>
                 </configuration>
             </plugin>