eclipse-tractusx / item-relationship-service

https://eclipse-tractusx.github.io/item-relationship-service/docs/
Apache License 2.0
7 stars 21 forks source link

Improve code formatting settings Part 2 #414

Open ds-psosnowski opened 7 months ago

ds-psosnowski commented 7 months ago

First part of a story has covered preparation for code formatting settings including plugin configuration to support auto-format code to match google standard. https://github.com/eclipse-tractusx/item-relationship-service/issues/319

Second part of a story is to format old code base to match current format and change config of maven-checkstyle-plugin to match new format. After code is formatted this should be changed in checkstyle.xml file:

<module name="Indentation">
            <property name="basicOffset" value="2"/>
            <property name="braceAdjustment" value="0"/>
            <property name="caseIndent" value="2"/>
            <property name="throwsIndent" value="2"/>
            <property name="lineWrappingIndentation" value="2"/>
            <property name="arrayInitIndent" value="2"/>
        </module>

After this change maven build will fail on validate goal if code does not follow google standard. Also update from @dsmf - please also update PMD rule to match max length of a comment size: image

Acceptance Criteria

dsmf commented 4 months ago

PMD comment maxLineLength was already set to 120 in https://github.com/catenax-ng/tx-item-relationship-service/commit/d87d6aa04ed255c4ac30cec56c56db4407e87073