- Follow EO principles
- Use
@todo #/DEV
labels for all todo tasks. Its allows 0pdd to create the issues. - Run
mvn clean package -Pqulice
before 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 ([email protected]) * @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 ([email protected]) * @version $Id$ * @since 1.0.0 */
- Specify your name and email
- Press
Apply
,OK
.
- Settings > Editor > Code Style
- Change
Hard wrap at
to80
- Change
Line separator
toUnix and OS X (\n)
- Press
Apply
>OK
- Change
- Settings > Editor > Code Style > Java > Wrapping and Braces
- Enable
Ensure right margin is not exceeded
tick
- Enable
- Settings > Editor > Code Style > Java > Wrapping and Braces > Method declaration parameters
- Disable
Align when multiline
tick - 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 declarations
equal to 0 in sectionKeep Maximum Blank Lines
- Set
- Settings > Editor > Code Style > Java > Imports
- Set the following order for
Import Layout
sectionimport 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 before
withLength
equal to 1 - Disable
Add blank line after
- Select
- Settings > Editor > Code Style > Java > Tabs and Indents
- Change
Continuation Indent
to 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 ([email protected]) * @version $Id$ * @since 1.0 * @checkstyle JavadocMethodCheck (500 lines) */ @SuppressWarnings("PMD.AvoidDuplicateLiterals")
- Press
Apply
- Settings > File and Code Templates > Includes > Code
- Change
JUnit4 Test Class
to... #parse("Unit-test File Header.java") ...
- Change
JUnit5 Test Class
to... #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