This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 2225b9a [KYUUBI #2143] [KYUBBI #2142][DOCS] Add IDEA setup guide
2225b9a is described below
commit 2225b9a17559058734786c386c49c317de603472
Author: Ada Wong <[email protected]>
AuthorDate: Wed Mar 16 14:43:21 2022 +0800
[KYUUBI #2143] [KYUBBI #2142][DOCS] Add IDEA setup guide
### _Why are the changes needed?_
Add IDEA setup guide for developers.
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including
negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [x] [Run
test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests)
locally before make a pull request
Closes #2143 from deadwind4/KYUUBI-2142.
Closes #2143
f0450c05 [Ada Wong] Update formatter for Java
be77cfe5 [Ada Wong] [KYUBBI #2142][DOCS] Add IDEA setup guide
Authored-by: Ada Wong <[email protected]>
Signed-off-by: Cheng Pan <[email protected]>
---
CONTRIBUTING.md | 3 ++
docs/develop_tools/idea_setup.md | 101 +++++++++++++++++++++++++++++++++++++++
docs/develop_tools/index.rst | 1 +
3 files changed, 105 insertions(+)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7ff33c7..8b581bb 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -58,3 +58,6 @@ You can make various types of contributions to Kyuubi,
including the following b
## Easter Eggs for Contributors
TBD, please be patient for the surprise.
+
+## IDE Setup Guide
+[IntelliJ IDEA Setup
Guide](https://kyuubi.apache.org/docs/latest/develop_tools/idea_setup.html)
diff --git a/docs/develop_tools/idea_setup.md b/docs/develop_tools/idea_setup.md
new file mode 100644
index 0000000..1642309
--- /dev/null
+++ b/docs/develop_tools/idea_setup.md
@@ -0,0 +1,101 @@
+<!--
+ - Licensed to the Apache Software Foundation (ASF) under one or more
+ - contributor license agreements. See the NOTICE file distributed with
+ - this work for additional information regarding copyright ownership.
+ - The ASF licenses this file to You under the Apache License, Version 2.0
+ - (the "License"); you may not use this file except in compliance with
+ - the License. You may obtain a copy of the License at
+ -
+ - http://www.apache.org/licenses/LICENSE-2.0
+ -
+ - Unless required by applicable law or agreed to in writing, software
+ - distributed under the License is distributed on an "AS IS" BASIS,
+ - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ - See the License for the specific language governing permissions and
+ - limitations under the License.
+ -->
+
+<div align=center>
+
+
+
+</div>
+
+# IntelliJ IDEA Setup Guide
+
+## Copyright Profile
+
+Every file needs to include the Apache license as a header. This can be
automated in IntelliJ by adding a Copyright
+profile:
+
+1. Go to "Settings/Preferences" → "Editor" → "Copyright" → "Copyright
Profiles".
+2. Add a new profile and name it "Apache".
+3. Add the following text as the copyright text:
+
+ ```
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ```
+4. Go to "Editor" → "Copyright" and choose the "Apache" profile as the default
profile for this project.
+5. Click "Apply".
+
+## Required Plugins
+
+Go to "Settings/Preferences" → "Plugins" and select the "Marketplace" tab.
Search for the following plugins, install
+them, and restart the IDE if prompted:
+
+* [Scala](https://plugins.jetbrains.com/plugin/1347-scala)
+
+You will also need to install the
[google-java-format](https://github.com/google/google-java-format)
+plugin. However, a specific version of this plugin is required. Download
+[google-java-format
v1.7.0.6](https://plugins.jetbrains.com/plugin/8527-google-java-format/versions/stable/115957)
+and install it as follows. Make sure to NEVER update this plugin.
+
+1. Go to "Settings/Preferences" → "Plugins".
+2. Click the gear icon and select "Install Plugin from Disk".
+3. Navigate to the downloaded ZIP file and select it.
+
+## Formatter For Java
+
+Kyuubi uses
[Spotless](https://github.com/diffplug/spotless/tree/main/plugin-maven)
together with
+[google-java-format](https://github.com/google/google-java-format) to format
the Java code.
+
+It is recommended to automatically format your code by applying the following
settings:
+
+1. Go to "Settings/Preferences" → "Other Settings" → "google-java-format
Settings".
+2. Tick the checkbox to enable the plugin.
+3. Change the code style to "Default Google Java style".
+4. Go to "Settings/Preferences" → "Tools" → "Actions on Save".
+5. Select "Reformat code".
+
+If you use the IDEA version is 2021.1 and below, please replace the above
steps 4 and 5 by using the
+[Save Actions](https://plugins.jetbrains.com/plugin/7642-save-actions) plugin.
+
+## Formatter For Scala
+
+Enable [Scalafmt](https://scalameta.org/scalafmt/) as follows:
+
+1. Go to "Settings/Preferences" → "Editor" → "Code Style" → "Scala"
+2. Set "Formatter" to "Scalafmt"
+3. Enable "Reformat on file save"
+
+## Checkstyle For Scala
+
+Enable [Scalastyle](http://www.scalastyle.org/) as follows:
+
+1. Go to "Settings/Preferences" → "Editor" → "Inspections".
+2. Search for "Scala style inspection" and enable it.
+
diff --git a/docs/develop_tools/index.rst b/docs/develop_tools/index.rst
index aa7815c..462f5be 100644
--- a/docs/develop_tools/index.rst
+++ b/docs/develop_tools/index.rst
@@ -29,3 +29,4 @@ Develop Tools
testing
debugging
developer
+ idea_setup