1. Efficient Java Static Checks¶
Table of Contents
Practice the following three to improve the quality and maintainability of code.
To execute the above, it is recommended to use IntelliJ IDEA(external site) , an IDE manufactured by JetBrains in Nablarch. An efficient Java static check method using IntelliJ IDEA is explained in this page.
To check the syntax, static inspection function (inspection) of IntelliJ IDEA is used. Inspection is a function that provides real time alerts by checking if the code follows the Java coding conventions and if there are any potential bugs.
The configuration file of inspection used in the development of Nablarch is provided for the project.
Inspection configuration is applied by downloading the below file and storing them under
To ensure that the same syntax check is performed by all developers, the inspection configuration file must be managed by VCS.
The Inspection configuration contents can be referred from the point where the warning was issued and can be checked efficiently on IDE. For this reason, separate documents, such as a list of checks should not be created.
Inspection can be customized by project based on the requirements.
The customized configuration is reflected in the configuration file under
The inspection configuration of IntelliJ IDEA is enabled by default and executed real time when the code is written. For more information, see Manual of IntelliJ.
To unify the format, formatted using the default code style of IntelliJ IDEA. For more information, see Manual of IntelliJ.
The Code Style configuration contents can be efficiently checked with IDE. For this reason, separate documents, such as coding conventions should not be created.
IntelliJ IDEA has a function that manages the formatting of target commit files when committing to VCS. By making effective use of this, it is possible to commit the code will in accordance with the Code Style.