...
You may also want to setup a specialized environment for the Beam modules you're working on:
Children Display
TODO: Improve this documentation
Jira | ||||||
---|---|---|---|---|---|---|
|
Previous documentation
The documentation below needs to be rechecked and reorganized. This is a work-in-progress. Jira server ASF JIRA serverId 5aa69414-a9e9-3523-82ec-879b028fb15b key BEAM-5764
Checkstyle
IntelliJ supports checkstyle within the IDE using the Checkstyle-IDEA plugin.
Note: Older versions of IntelliJ may not support the Checkstyle file used by Beam.
- Install the “Checkstyle-IDEA” plugin from the IntelliJ plugin repository
- Configure the plugin by going to Settings -> Other Settings -> Checkstyle
- Set Checkstyle version to the same as in
/build_rules.gradle
(e.g. 8.7) - Set the “Scan Scope” to “Only Java sources (including tests)”
- In the “Configuration File” pane, add a new configuration using the plus icon:
- Set the “Description” to “Beam”
- Select “Use a local Checkstyle file”, and point it to
sdks/java/build-tools/src/main/resources/beam/checkstyle.xml
within your repository - Check the box for “Store relative to project location”, and click “Next”
- Configure the
checkstyle.suppressions.file
property value tosuppressions.xml
, and click “Next”, then “Finish”
- Select “Beam” as the only active configuration file, and click “Apply” and “OK”
- 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.
Code Style
Uniform formatting for Java and Groovy code is automated by the build through the Spotless Gradle plugin. Instead of relying on the IDE, now you can run ./gradlew spotlessApply
to reformat changes prior to commit.
If you want to autoformat in the same way while you are developing, use the Google Java Format plugin.
Code Insight Feature Problems
...
In IntelliJ 2016 and higher: go to Help → Edit Custom Properties → Paste the following inside the properties file:
Code Block | ||
---|---|---|
| ||
#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.intellisense.filesize=2500 |
...
- Press CTRL + ALT + SHIT + S → Go to Project Settings → Facets → expand Python → click on child → Python Interpreter
- Project Settings → Modules → Expand module → Python → Dependencies → select Python module SDK