From bee981be8aa83225a8e3a736700eae445d79cece Mon Sep 17 00:00:00 2001 From: dawidwys Date: Wed, 4 May 2016 18:15:26 +0200 Subject: [PATCH] [FLINK-3870] Added IntelliJ code style --- docs/internals/ide_setup.md | 7 ++++ tools/FlinkCodeStyle.xml | 75 +++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 tools/FlinkCodeStyle.xml diff --git a/docs/internals/ide_setup.md b/docs/internals/ide_setup.md index 1a5d3cc4b0429..99353eb50f3fa 100644 --- a/docs/internals/ide_setup.md +++ b/docs/internals/ide_setup.md @@ -127,3 +127,10 @@ Prior to doing anything, make sure that the Flink project is built at least once 2. Select the root folder of the Flink repository 3. Choose "Import project from external model" and select "Maven" 4. Leave the default options and finish the import. + +### Setting code style schema +1. Go to IntelliJ code style settings (File -> Settings -> Editor -> Code Style) and click "Manage..." +2. Choose "Import..." and select "Import from IntelliJ IDEA code style XML" +3. Point to the code style schema file (/*-project root-*/tools/FlinkCodeStyle.xml) +4. Name the schema in "To:" field or leave it as it is and leave the option "Current schema" deselected. +5. Make sure it is chosen as the active schema in code style settings. diff --git a/tools/FlinkCodeStyle.xml b/tools/FlinkCodeStyle.xml new file mode 100644 index 0000000000000..314f8c4f5f131 --- /dev/null +++ b/tools/FlinkCodeStyle.xml @@ -0,0 +1,75 @@ + + +