Commit Graph
13 Commits
Author SHA1 Message Date
Jacques Le Roux 2480c52c6a Improved: Comment out HideUtilityClassConstructor in checkstyle.xml (OFBIZ-12061)
Currently Checkstyle returns 222 occurrences of the message
"Utility classes should not have a public or default constructor."

This is due to https://checkstyle.sourceforge.io/config_design.html#HideUtilityClassConstructor
I don't think we need to follow the "prevents calls from subclass" suggestion there.

I rather suggest to comment out the related class in checkstyle.xml:

    ie <!-- <module name="HideUtilityClassConstructor"/> -->

Then should remain only 280 errors and hopefully most will be easy to fix.
At least they will be easier to spot...

Note: I'm working on something else, so I will change
tasks.checkstyleMain.maxErrors from 502 to 280 later...

Thanks: Suraj and Aditya for confirmation
2020-11-18 17:12:58 +01:00
Suraj Khurana d70bb8763e Improved: Added override property in DesignForExtension module to avoid unnecessary design for extension checkstyle error messages for overrided methods.
(OFBIZ-11941)
Thanks Jacques for you inputs.
2020-08-09 13:19:03 +05:30
Suraj Khurana 6df66ff7a7 Improved: Corrected max parameter number allowed checkstyle rule, also added proeprty for ignoring overridden methods.
(OFBIZ-11931)
Thanks Jacques for your inputs.
2020-08-09 12:43:59 +05:30
Suraj Khurana 8f02800414 Improved: MethodLength checkstyle rule, earlier it was set as default to 150, as per discussion over ML changed it to 500 and also set countEmpty propety as false.
(OFBIZ-11915)
Thanks: Jacques for your thoughts and suggestions.
2020-08-06 19:18:31 +05:30
Suraj Khurana afa98bb8a6 Improved: Updated checkstyle.xml with allowSingleLineStatement as true, this brings down checkstyle maxErrors to 20037.(-625).
(OFBIZ-11886)
Thanks Jacques for your suggestions and comments.
2020-07-21 12:44:20 +05:30
Suraj Khurana d6ebef6193 Improved: Improved: Changed lineSplit value to 150.
(OFBIZ-11737)
Earlier it was 120, as per discussion over ML we decided to make it 150 instead.
2020-05-25 17:24:30 +05:30
Jacques Le Roux 00ec6c677b Improvement: Upgrade Gradle and Groovy
(OFBIZ-11661)

Fixes a known issue with config/checkstyle/checkstyle.xml:

TreeWalker is not allowed as a parent of LineLength Please review 'Parent Module'
section for this Check in web documentation if Check is standard
2020-05-06 15:08:57 +02:00
Jacques Le Roux b95fa36bf4 Improved: follow checkstyle conventions in files committed for CSRF token defense
Mostly manually-automated, so some changes are not perfect. I have manually
changed back excessive ones

Comments out ArrayTypeStyle checkstyle
Updates checkstyleMain.maxErrors
2020-04-06 12:05:16 +02:00
Daniel Watford e665f9dc68 Improved: Set checkstyle to use LF line endings
(OFBIZ-11428)

Setting checkstyle to use LF line endings means that a newline at the
end of a source file is correctly detected no matter whether it is
checked out with LF or CRLF line endings.
2020-02-28 10:37:02 +00:00
Samuel Trégouët 7044af8a6f Implemented: Add a generic directed graph utilitary class
(OFBIZ-11275)
2019-11-08 18:19:51 +01:00
Mathieu Lirzin f5aac701c6 Implemented: Allow deprecated public fields
(OFBIZ-11256)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868627 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 14:24:34 +00:00
Jacques Le Roux 2de3b83eca Improved: no functional change
Adds missing ASL2 header

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868619 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 08:57:14 +00:00
Mathieu Lirzin 5363a7773a Improved: Use ‘checkstyle’ linting tool
(OFBIZ-11251)

Linting [1] is a software engineering practice which make the code more
readable and maintainable by improving its consistency and avoiding
potential programming mistakes.  Gradle provides a core plugin for the
‘checkstyle’ tool [2][3] which implement a linting facility for the Java
language.

The check is done with the ‘gradlew check’ command.

There are currently a lot reported errors that will need to be fixed
incrementally in the future.  We ensure that new errors will not be
introduced by defining a global threshold of “allowed” errors
corresponding to the sum of errors found in the framework and in the
official plugins.

[1] https://en.wikipedia.org/wiki/Lint_(software)
[2] https://checkstyle.org/
[3] https://docs.gradle.org/current/userguide/checkstyle_plugin.html

Thanks: Taher Alkhateeb and Jacques Le Roux for their feedback


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1868597 13f79535-47bb-0310-9956-ffa450edef68
2019-10-18 14:56:50 +00:00