Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5C02E200C62 for ; Wed, 26 Apr 2017 12:07:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5AA4B160BBD; Wed, 26 Apr 2017 10:07:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A8640160B95 for ; Wed, 26 Apr 2017 12:07:24 +0200 (CEST) Received: (qmail 15367 invoked by uid 500); 26 Apr 2017 10:07:23 -0000 Mailing-List: contact commits-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list commits@flink.apache.org Received: (qmail 15351 invoked by uid 99); 26 Apr 2017 10:07:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Apr 2017 10:07:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B46ABDFB94; Wed, 26 Apr 2017 10:07:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aljoscha@apache.org To: commits@flink.apache.org Date: Wed, 26 Apr 2017 10:07:23 -0000 Message-Id: <834b723d40ec4a08b62ceaa707e0b593@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [01/23] flink git commit: [FLINK-6107] Add checkstyle section to IDE Setup Guide archived-at: Wed, 26 Apr 2017 10:07:25 -0000 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 Authored: Wed Mar 22 13:58:01 2017 +0100 Committer: Aljoscha Krettek 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. + +Note Selecting "Check Project" may report some errors from the archetype +modules as they are not configured for Checkstyle validation. + +Note 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