- Follow EO principles
- Use
@todo #/DEVlabels for all todo tasks. Its allows 0pdd to create the issues. - Run
mvn clean package -Pqulicebefore commit. All issues related to your code should be fixed before commit. - Each class should have the javadocs with these tags
@author,@version,@since. For example,You can configure such template in your IDE. For IntelliJ IDEA:/** * . * * @author Yurii Dubinka (yurii.dubinka@gmail.com) * @version $Id$ * @since 1.0.0 */ public final class Args { ...
- File > Settings > Editor > File and Code Templates > Includes > File Header
- Put the following text (change name, email and version accordingly)
/** * * . * * @author Yurii Dubinka (yurii.dubinka@gmail.com) * @version $Id$ * @since 1.0.0 */
- Specify your name and email
- Press
Apply,OK.
- Settings > Editor > Code Style
- Change
Hard wrap atto80 - Change
Line separatortoUnix and OS X (\n) - Press
Apply>OK
- Change
- Settings > Editor > Code Style > Java > Wrapping and Braces
- Enable
Ensure right margin is not exceededtick
- Enable
- Settings > Editor > Code Style > Java > Wrapping and Braces > Method declaration parameters
- Disable
Align when multilinetick - Press
Apply>OK
- Disable
- Settings > Editor > Code Style > Java > JavaDoc
- Disable
Generate "<p>" on empty lines
- Disable
- Settings > Editor > Code Style > Java > Blank Lines
- Set
In declarationsequal to 0 in sectionKeep Maximum Blank Lines
- Set
- Settings > Editor > Code Style > Java > Imports
- Set the following order for
Import Layoutsectionimport java.* import javax.* import all other imports import static all other imports
- Change
Class count to use import with '*'to 20 - Change
Names count to use static import with '*'to 20
- Set the following order for
- Settings > Editor > Сopyright > Formatting > Java
- Select
Use custom formatting options - Select
Separator beforewithLengthequal to 1 - Disable
Add blank line after
- Select
- Settings > Editor > Code Style > Java > Tabs and Indents
- Change
Continuation Indentto 4 - Press
OK
- Change
- Settings > Editor > Copyright > Copyright Profiles > Add new with name
default>- Copy license
- Press
Apply>OK
- Settings > Editor > Code Style > Java > Code Generation
- Select option "Make generated local variables final"
- Select option "Make generated parameters final"
- Settings > Editor > Code Style > Java > Spaces
- Select
Array initializer braces - Press
Apply>OK
- Select
- Settings > Editor > File and Code Templates > Includes
- Press
+, name =Unit-test File Header, extension =java - Add text like below (change name, email and version accordingly)
/** * Unit tests for class {@link }. * * @author Yurii Dubinka (yurii.dubinka@gmail.com) * @version $Id$ * @since 1.0 * @checkstyle JavadocMethodCheck (500 lines) */ @SuppressWarnings("PMD.AvoidDuplicateLiterals")
- Press
Apply - Settings > File and Code Templates > Includes > Code
- Change
JUnit4 Test Classto... #parse("Unit-test File Header.java") ... - Change
JUnit5 Test Classto... #parse("Unit-test File Header.java") ... - Press
OK
- Press
- Settings > Editor > General > Appearance
- Disable
Show parameter name hints - Press
Apply>OK
- Disable
- Settings > Editor > General > Code Folding
- Disable
One-line methods - Press
Apply>OK
- Disable