[
https://issues.apache.org/jira/browse/ATLAS-4957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17916800#comment-17916800
]
ASF subversion and git services commented on ATLAS-4957:
--------------------------------------------------------
Commit 55655786bbce673d9c94e696e8d0d4b4a17dbace in atlas's branch
refs/heads/atlas-2.5 from Madhan Neethiraj
[ https://gitbox.apache.org/repos/asf?p=atlas.git;h=55655786b ]
ATLAS-4957: checkstyle compliance updates - atlas-common module (#272)
(cherry picked from commit 155c854c6cb113e190740e17665179526a079f1f)
> atlas-common module: update for code readability improvement
> ------------------------------------------------------------
>
> Key: ATLAS-4957
> URL: https://issues.apache.org/jira/browse/ATLAS-4957
> Project: Atlas
> Issue Type: Sub-task
> Components: atlas-core
> Reporter: Madhan Neethiraj
> Assignee: Madhan Neethiraj
> Priority: Major
> Fix For: 3.0.0
>
> Attachments: ATLAS-4957.patch
>
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Here are the steps to update the sources to be compliant with the checkstyle
> requirements:
> # Update IntelliJ IDE (one time operation) with code schema corresponding to
> Atlas checkstyle requirements:
> ## IntelliJ IDEA/Settings/Editor/Code Style/Java
> ## Click on icon next to Scheme, then select Import Scheme/IntelliJ IDEA
> code style XML
> ## Pick dev-support/AtlasCodeScheme-IntelliJ.xml from Apache Atlas master
> branch
> ## Click OK, OK
> # Steps to update Java sources in a module to comply with checkstyle
> requirements:
> ## Add following property to module's pom.xml, so that build will fail on
> checkstyle violations
> *** <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
> *** <checkstyle.skip>false</checkstyle.skip>
> ## Click on the module name in the Project navigation at the left side of
> the IDE
> ## Click on menu (at the top of the IDE): Code/Reformat Code
> ## Check the following boxes, and click Run
> *** Optimize Imports
> *** Rearrange entries
> *** Cleanup Code
> *** Filters: Scope - All Places
> *** Filters: File mask(s) - *.java
> ## Build the module with command: *mvn clean verify*
> ## Review reported errors, similar to errors shown below, update sources to
> address them, ensure that the build succeeds with no errors
> *** [ERROR]
> src/main/java/org/apache/atlas/model/instance/AtlasEntity.java:[549,40]
> (whitespace) WhitespaceAround: '=' is not preceded with whitespace.
> *** [ERROR]
> src/main/java/org/apache/atlas/model/instance/AtlasEntity.java:[555] (regexp)
> RegexpMultiline: Multiple consecutive blank lines
> *** [ERROR]
> src/main/java/org/apache/atlas/model/instance/AtlasEntity.java:[576,63]
> (blocks) LeftCurly: '{' at column 63 should have line break after.
> *** [ERROR]
> src/test/java/org/apache/atlas/model/typedef/TestAtlasRelationshipDef.java:[77]
> (whitespace) EmptyLineSeparator: 'METHOD_DEF' should be separated from
> previous statement.
> *** [ERROR]
> src/test/java/org/apache/atlas/model/instance/TestAtlasClassification.java:[30,15]
> (imports) UnusedImports: Unused import - org.testng.Assert.assertTrue.
> *** ...
> *** [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-checkstyle-plugin:3.1.0:check
> (checkstyle-check) on project atlas-intg: You have 2621 Checkstyle
> violations. -> [Help 1]
> ## Review each Java file in the module for the following and update where
> necessary
> ### Ensure that Logger initialization is at the top of the class,
> immediately after class declartion. It is likely that the code reformat
> performed earlier pushed this line after other initializations
> **** private static final Logger LOG =
> LoggerFactory.getLogger(TestAtlasRelationshipDef.class);
> ### Separate member declaration of different scope/visibility with an empty
> line - if it helps readability.
> ### Join multiline statements into a single line.
> ### Review Warnings flagged by the IDE by clicking on icon at the top-right
> of the source file, and address as many of them as safely possible. However,
> please make sure to not make any changes (like the examples given below) that
> can break existing usage. Note that usage of a class (methods, fields) may
> not be in Atlas repo - consider hooks for NiFi, Spark are not in Atlas repo.
> #### remove/rename a method or field
> #### changing visibility of a method or field
> #### changing signature of a method
--
This message was sent by Atlassian Jira
(v8.20.10#820010)