You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/05/06 20:22:06 UTC

[GitHub] [pulsar] cbornet commented on a change in pull request #10493: Add instructions to configure code style and checkstyle for IDEA

cbornet commented on a change in pull request #10493:
URL: https://github.com/apache/pulsar/pull/10493#discussion_r627737974



##########
File path: README.md
##########
@@ -211,6 +211,39 @@ required plugins.
 
 5. Install the lombok plugin in intellij.
 
+#### Configure code style
+
+1. Open Code Style Settings dialog box by going to **Settings** -> **Editor** -> **Code Style**.
+
+2. Click on the :gear: symbol -> **Import scheme** -> **Intellij IDEA code style XML**
+
+3. Pick the file `${pulsar_dir}/src/idea-code-style.xml`
+
+4. On the dialog box that opens, click **OK**.
+
+5. Ensure the scheme you just created is selected in **Scheme** dropdown then click **OK**.
+
+#### Configure Checkstyle
+
+1. Install the Checkstyle-IDEA plugin
+
+2. Open Checkstyle Settings dialog box by going to **Settings** -> **Tools** -> **Checkstyle**.
+
+3. Set **Checkstyle version** to **8.37**
+
+4. Set **Scan scope** to **Only Java sources (including tests)**
+
+5. Click the **+** button in the **Configuration** section to open a dialog to choose the checkfile file.
+   1. Enter a **Description**. Eg. Pulsar.
+   2. Select **Use a local checkstyle file**.
+   3. Set **File** to **buildtools/src/main/resources/pulsar/checkstyle.xml**.
+   4. Select **Store relative to project location**.
+   5. Click **Next**, then **Next** again, then **Finish**.

Review comment:
       `suppressions.xml` is loaded by default. There's a property to use another filename but it's not needed for us.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org