flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aljos...@apache.org
Subject [01/23] flink git commit: [FLINK-6107] Add checkstyle section to IDE Setup Guide
Date Wed, 26 Apr 2017 10:07:23 GMT
Repository: flink
Updated Branches:
  refs/heads/master 70183647a -> 545f50026


[FLINK-6107] Add checkstyle section to IDE Setup Guide


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/545f5002
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/545f5002
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/545f5002

Branch: refs/heads/master
Commit: 545f50026c863c80978a2d0b9446ad6bf87a3596
Parents: b24c917
Author: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Authored: Wed Mar 22 13:58:01 2017 +0100
Committer: Aljoscha Krettek <aljoscha.krettek@gmail.com>
Committed: Wed Apr 26 10:36:50 2017 +0200

----------------------------------------------------------------------
 docs/internals/ide_setup.md | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/545f5002/docs/internals/ide_setup.md
----------------------------------------------------------------------
diff --git a/docs/internals/ide_setup.md b/docs/internals/ide_setup.md
index 329f4cd..33abf61 100644
--- a/docs/internals/ide_setup.md
+++ b/docs/internals/ide_setup.md
@@ -81,6 +81,39 @@ to enable support for Scala projects and files:
    files for the IDE to work with but without installing libraries.
 8. Build the Project (Build -> Make Project)
 
+### Checkstyle
+IntelliJ supports checkstyle within the IDE using the Checkstyle-IDEA plugin.
+
+1. Install the "Checkstyle-IDEA" plugin from the IntelliJ plugin repository.
+1. Configure the plugin by going to Settings -> Other Settings -> Checkstyle.
+1. Set the "Scan Scope" to "Only Java sources (but not tests)".
+1. In the "Configuration File" pane, add a new configuration using the plus icon:
+    1. Set the "Description" to "Flink".
+    1. Select "Use a local Checkstyle file", and point it to
+      `"tools/maven/checkstyle.xml"` within
+      your repository.
+    1. Check the box for "Store relative to project location", and click
+      "Next".
+    1. Configure the "checkstyle.suppressions.file" property value to
+      `"suppressions.xml"`, and click "Next", then "Finish".
+1. Select "Flink" as the only active configuration file, and click "Apply" and
+   "OK".
+1. Checkstyle will now give warnings in the editor for any Checkstyle
+   violations.
+
+You can also scan an entire module by opening the Checkstyle tools window and
+clicking the "Check Module" button. The scan should report no errors.
+
+<span class="label label-info">Note</span> Selecting "Check Project" may report
some errors from the archetype
+modules as they are not configured for Checkstyle validation.
+
+<span class="label label-info">Note</span> Some modules use a more strict `checkstyle.xml`
file called
+`strict-checkstyle.xml`. You should setup an additional configuration by following the above
+steps for this file as well and activate it on a per-module basis. To set a per-module checkstyle
+configuration go to File -> Project Structure. Then select the module for which you want
to change
+the checkstyle configuration in the modules list and change the checkstyle configuration
in the
+Checkstyle tab.
+
 ## Eclipse
 
 **NOTE:** From our experience, this setup does not work with Flink


Mime
View raw message