[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2023-07-17 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17743666#comment-17743666
 ] 

ASF subversion and git services commented on OFBIZ-11167:
-

Commit 3e902e923f72f6516e781ed10b2617370f34679b in ofbiz-framework's branch 
refs/heads/trunk from Jacques Le Roux
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=3e902e923f ]

Fixed: IndexOutOfBoundsException occured while placing order (OFBIZ-12838)

After "continuing" twice while creating a sales order the error appears.
This is due to OFBIZ-11167

Thanks: Chirag Jain for reporting and a detailed explanation for the fix


> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Fix For: 22.01.01, Upcoming Branch
>
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Thread of community discussion about the rules to implement : 
> https://www.mail-archive.com/search?l=dev%40ofbiz.apache.org=subject:%22Codenarc+integration%2C+rules+to+use.%22=newest=1
>  
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> [https://docs.gradle.org/current/userguide/codenarc_plugin.html]
> We already discussed it at [https://markmail.org/message/uigcpnxqgizhd2oi] 
> and [https://markmail.org/message/rp6njoiohkkiodbe]
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> [http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html]
> [http://codenarc.sourceforge.net/codenarc-creating-ruleset.html]
> [https://github.com/gradle/gradle/tree/master/config]
> [https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s]
> [https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2023-07-17 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17743664#comment-17743664
 ] 

ASF subversion and git services commented on OFBIZ-11167:
-

Commit 1c2532a350ab6842295bfcf32f5cb418269563fb in ofbiz-framework's branch 
refs/heads/release22.01 from Jacques Le Roux
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=1c2532a350 ]

Fixed: IndexOutOfBoundsException occured while placing order (OFBIZ-12838)

After "continuing" twice while creating a sales order the error appears.
This is due to OFBIZ-11167

Thanks: Chirag Jain for reporting and a detailed explanation for the fix

Conflict handled by hand


> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Fix For: 22.01.01, Upcoming Branch
>
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Thread of community discussion about the rules to implement : 
> https://www.mail-archive.com/search?l=dev%40ofbiz.apache.org=subject:%22Codenarc+integration%2C+rules+to+use.%22=newest=1
>  
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> [https://docs.gradle.org/current/userguide/codenarc_plugin.html]
> We already discussed it at [https://markmail.org/message/uigcpnxqgizhd2oi] 
> and [https://markmail.org/message/rp6njoiohkkiodbe]
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> [http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html]
> [http://codenarc.sourceforge.net/codenarc-creating-ruleset.html]
> [https://github.com/gradle/gradle/tree/master/config]
> [https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s]
> [https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2023-04-19 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17714056#comment-17714056
 ] 

Jacques Le Roux commented on OFBIZ-11167:
-

Everybody can now help by looking at 
https://nightlies.apache.org/ofbiz/trunk/groovyScripts.html

> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Fix For: 22.01.01, Upcoming Branch
>
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Thread of community discussion about the rules to implement : 
> https://www.mail-archive.com/search?l=dev%40ofbiz.apache.org=subject:%22Codenarc+integration%2C+rules+to+use.%22=newest=1
>  
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> [https://docs.gradle.org/current/userguide/codenarc_plugin.html]
> We already discussed it at [https://markmail.org/message/uigcpnxqgizhd2oi] 
> and [https://markmail.org/message/rp6njoiohkkiodbe]
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> [http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html]
> [http://codenarc.sourceforge.net/codenarc-creating-ruleset.html]
> [https://github.com/gradle/gradle/tree/master/config]
> [https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s]
> [https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2023-04-13 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17711716#comment-17711716
 ] 

ASF subversion and git services commented on OFBIZ-11167:
-

Commit 5f9ace26bfb72c6324fece1853107b26399f7975 in ofbiz-framework's branch 
refs/heads/trunk from Jacques Le Roux
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=5f9ace26bf ]

Fixed: Use Codenarc to test Groovy code (OFBIZ-11167)

Adds a missing ASL2 header into codenarc.groovy


> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Fix For: 22.01.01, Upcoming Branch
>
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Thread of community discussion about the rules to implement : 
> https://www.mail-archive.com/search?l=dev%40ofbiz.apache.org=subject:%22Codenarc+integration%2C+rules+to+use.%22=newest=1
>  
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> [https://docs.gradle.org/current/userguide/codenarc_plugin.html]
> We already discussed it at [https://markmail.org/message/uigcpnxqgizhd2oi] 
> and [https://markmail.org/message/rp6njoiohkkiodbe]
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> [http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html]
> [http://codenarc.sourceforge.net/codenarc-creating-ruleset.html]
> [https://github.com/gradle/gradle/tree/master/config]
> [https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s]
> [https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2023-04-12 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17711426#comment-17711426
 ] 

ASF subversion and git services commented on OFBIZ-11167:
-

Commit 5d2301637f0f48ccdcdc4ad412698485c81fd39d in ofbiz-framework's branch 
refs/heads/trunk from Gil Portenseigne
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=5d2301637f ]

Codenarc integration rebased (#618)

Implemented : Use Codenarc to test Groovy code (OFBIZ-11167)

Add gradle Codenarc plugin integration with a set of rules to be checked.

Every groovy files of ofbiz-framework where checked and fixed to comply with the
rules.

Codenarc plugin configuration includes max priority violation threshold for the
three levels, to allow the build to pass with plugins that were not fixed
regarding the configured codenarc rules.

Many Thanks to Daniel Watford, Jacques Le Roux for the code review organisation
and for the review
Thanks to Nicolas Malin and Leila Mekika for their review.



> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Thread of community discussion about the rules to implement : 
> https://www.mail-archive.com/search?l=dev%40ofbiz.apache.org=subject:%22Codenarc+integration%2C+rules+to+use.%22=newest=1
>  
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> [https://docs.gradle.org/current/userguide/codenarc_plugin.html]
> We already discussed it at [https://markmail.org/message/uigcpnxqgizhd2oi] 
> and [https://markmail.org/message/rp6njoiohkkiodbe]
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> [http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html]
> [http://codenarc.sourceforge.net/codenarc-creating-ruleset.html]
> [https://github.com/gradle/gradle/tree/master/config]
> [https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s]
> [https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2022-12-17 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17648878#comment-17648878
 ] 

Jacques Le Roux commented on OFBIZ-11167:
-

+1

> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Thread of community discussion about the rules to implement : 
> https://www.mail-archive.com/search?l=dev%40ofbiz.apache.org=subject:%22Codenarc+integration%2C+rules+to+use.%22=newest=1
>  
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> [https://docs.gradle.org/current/userguide/codenarc_plugin.html]
> We already discussed it at [https://markmail.org/message/uigcpnxqgizhd2oi] 
> and [https://markmail.org/message/rp6njoiohkkiodbe]
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> [http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html]
> [http://codenarc.sourceforge.net/codenarc-creating-ruleset.html]
> [https://github.com/gradle/gradle/tree/master/config]
> [https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s]
> [https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2022-12-16 Thread Gil Portenseigne (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17648644#comment-17648644
 ] 

Gil Portenseigne commented on OFBIZ-11167:
--

Work still ongoing, i propose to remove rule TrailingComma : Check whether list 
and map literals contain optional trailing comma.

> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> https://docs.gradle.org/current/userguide/codenarc_plugin.html
> We already discussed it at https://markmail.org/message/uigcpnxqgizhd2oi and 
> https://markmail.org/message/rp6njoiohkkiodbe
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html
> http://codenarc.sourceforge.net/codenarc-creating-ruleset.html
> https://github.com/gradle/gradle/tree/master/config
> https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s
> https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2022-07-03 Thread Gil Portenseigne (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17561935#comment-17561935
 ] 

Gil Portenseigne commented on OFBIZ-11167:
--

I wrote a little script to extract the rules in order of occurrence. I will 
launch an email to the dev list to discuss about the rules to be respected, and 
the implied changes.

There are the results :
||Number of occurence||Rule name and details||
|9883|UnnecessaryGString - String objects should be created with single quotes, 
and GString objects created with double quotes. Creating normal String objects 
with double quotes is confusing to readers.|
|4569|DuplicateStringLiteral - Code containing duplicate String literals can 
usually be improved by declaring the String as a constant field. The 
ignoreStrings property () can optionally specify a comma-separated list of 
Strings to ignore.|
|4209|SpaceAroundMapEntryColon - Check for configured formatting of whitespace 
around colons for literal Map entries. The characterBeforeColonRegex and 
characterAfterColonRegex properties specify a regular expression that must 
match the character before/after the colon.|
|1448|LineLength - Checks the maximum length for each line of source code. It 
checks for number of characters, so lines that include tabs may appear longer 
than the allowed number when viewing the file. The maximum line length can be 
configured by setting the length property, which defaults to 120.|
|885|UnnecessaryGetter - Checks for explicit calls to getter/accessor methods 
which can, for the most part, be replaced by property access. A getter is 
defined as a method call that matches get[A-Z] but not getClass() or 
get[A-Z][A-Z] such as getURL(). Getters do not take method arguments. The 
ignoreMethodNames property (null) can specify method names that should be 
ignored, optionally containing wildcard characters ('*' or '?').|
|601|NoDef - def should not be used. You should replace it with concrete type.|
|485|MethodReturnTypeRequired - Checks that method return types are not 
dynamic, that is they are explicitly stated and different than def.|
|484|Indentation - Check indentation for class and method declarations, and 
initial statements.|
|482|UnnecessaryReturnKeyword - In Groovy, the return keyword is often 
optional. If a statement is the last line in a method or closure then you do 
not need to have the return keyword.|
|407|UnnecessaryObjectReferences - Violations are triggered when an excessive 
set of consecutive statements all reference the same variable. This can be made 
more readable by using a with or identity block.|
|345|CompileStatic - Check that classes are explicitely annotated with either 
@GrailsCompileStatic, @CompileStatic or @CompileDynamic|
|320|ExplicitCallToEqualsMethod - This rule detects when the equals(Object) 
method is called directly in code instead of using the == or != operator. A 
groovier way to express this: a.equals(b) is this: a == b and a groovier way to 
express : !a.equals(b) is : a != b|
|235|IfStatementBraces - Use braces for if statements, even for a single 
statement.|
|235|SpaceAroundOperator - Check that there is at least one space (blank) or 
whitespace around each binary operator.|
|211|NestedBlockDepth - Checks for blocks or closures nested more than 
maxNestedBlockDepth (5) levels deep.|
|201|TrailingWhitespace - Checks that no lines of source code end with 
whitespace characters.|
|190|DuplicateNumberLiteral - Code containing number String literals can 
usually be improved by declaring the number as a constant field. The 
ignoreNumbers property (0,1) can optionally specify a comma-separated list of 
numbers to ignore.|
|190|NoWildcardImports - Wildcard imports, static or otherwise, should not be 
used.|
|173|TrailingComma - Check whether list and map literals contain optional 
trailing comma.|
|167|InvertedCondition - An inverted condition is one where a constant 
expression is used on the left hand side of the equals comparision. Such 
conditions can be confusing especially when used in assertions where the 
expected value is by convention placed on the right hand side of the 
comparision.|
|167|JavadocEmptyReturnTag - Checks for empty @return tags within javadoc.|
|164|UnnecessarySetter - Checks for explicit calls to setter methods which can, 
for the most part, be replaced by assignment to property. A setter is defined 
as a method call that matches set[A-Z] but not set[A-Z][A-Z] such as setURL(). 
Setters take one method argument.|
|146|CouldBeElvis - Catch an if block that could be written as an elvis 
expression.|
|142|UnusedImport - Imports for a class that is never referenced within the 
source file is unnecessary.|
|141|AbcMetric - Checks the ABC size metric for methods/classes. A method (or 
"closure field") with an ABC score greater than the maxMethodAbcScore property 
(60) causes a violation. Likewise, a class that has an (average 

[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2022-07-01 Thread Gil Portenseigne (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17561468#comment-17561468
 ] 

Gil Portenseigne commented on OFBIZ-11167:
--

Hello Folks, i dig up this subject and started to work on it actively, i will 
push my progress here [https://github.com/apache/ofbiz-framework/pull/517.]

The Idea is to document each rule, and make one commit by rule on the pull 
request to ease the review and decide if a rule is worth keeping etc.

 

> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> https://docs.gradle.org/current/userguide/codenarc_plugin.html
> We already discussed it at https://markmail.org/message/uigcpnxqgizhd2oi and 
> https://markmail.org/message/rp6njoiohkkiodbe
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html
> http://codenarc.sourceforge.net/codenarc-creating-ruleset.html
> https://github.com/gradle/gradle/tree/master/config
> https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s
> https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2019-11-04 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16966555#comment-16966555
 ] 

Jacques Le Roux commented on OFBIZ-11167:
-

If that's possible that's certainly a good point. Having both seems even better 
to me, because users can later improve on it locally...

> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> https://docs.gradle.org/current/userguide/codenarc_plugin.html
> We already discussed it at https://markmail.org/message/uigcpnxqgizhd2oi and 
> https://markmail.org/message/rp6njoiohkkiodbe
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html
> http://codenarc.sourceforge.net/codenarc-creating-ruleset.html
> https://github.com/gradle/gradle/tree/master/config
> https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s
> https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2019-11-04 Thread Pierre Smits (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16966544#comment-16966544
 ] 

Pierre Smits commented on OFBIZ-11167:
--

Should we not have all code analysis done through the sonarcloud service? See 
OFBIZ-10917.

> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> https://docs.gradle.org/current/userguide/codenarc_plugin.html
> We already discussed it at https://markmail.org/message/uigcpnxqgizhd2oi and 
> https://markmail.org/message/rp6njoiohkkiodbe
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html
> http://codenarc.sourceforge.net/codenarc-creating-ruleset.html
> https://github.com/gradle/gradle/tree/master/config
> https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s
> https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2019-10-30 Thread Jacques Le Roux (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16962873#comment-16962873
 ] 

Jacques Le Roux commented on OFBIZ-11167:
-

Looks quite promising, thanks Gil!

> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> https://docs.gradle.org/current/userguide/codenarc_plugin.html
> We already discussed it at https://markmail.org/message/uigcpnxqgizhd2oi and 
> https://markmail.org/message/rp6njoiohkkiodbe
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html
> http://codenarc.sourceforge.net/codenarc-creating-ruleset.html
> https://github.com/gradle/gradle/tree/master/config
> https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s
> https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2019-10-29 Thread Mathieu Lirzin (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16962551#comment-16962551
 ] 

Mathieu Lirzin commented on OFBIZ-11167:


Nice!

> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Assignee: Gil Portenseigne
>Priority: Minor
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> https://docs.gradle.org/current/userguide/codenarc_plugin.html
> We already discussed it at https://markmail.org/message/uigcpnxqgizhd2oi and 
> https://markmail.org/message/rp6njoiohkkiodbe
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html
> http://codenarc.sourceforge.net/codenarc-creating-ruleset.html
> https://github.com/gradle/gradle/tree/master/config
> https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s
> https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (OFBIZ-11167) Use Codenarc to test Groovy code

2019-10-29 Thread Gil Portenseigne (Jira)


[ 
https://issues.apache.org/jira/browse/OFBIZ-11167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16962501#comment-16962501
 ] 

Gil Portenseigne commented on OFBIZ-11167:
--

Hello [~jleroux] , [~mthl] and others

I did play a bit with codenarc and got a first step integration.

You can find attached the gradle integration and a custom rule file with all of 
the provided rules fount here : 
[http://codenarc.sourceforge.net/StarterRuleSet-AllRulesByCategory.groovy.txt] 
(i needed to remove some rules that where not recognized, since codenarc last 
revision is provided with upcoming gradle 6).

I attached the results against trunk, each file described every rule violations 
with the rule references at the bottom of the page.

I will take a look more closely in the next days/week, to clean up rules for 
OFBiz :)

Regards

 

 

 

> Use Codenarc to test Groovy code
> 
>
> Key: OFBIZ-11167
> URL: https://issues.apache.org/jira/browse/OFBIZ-11167
> Project: OFBiz
>  Issue Type: New Feature
>  Components: framework
>Reporter: Jacques Le Roux
>Priority: Minor
> Attachments: OFBIZ-11167.patch, main.html, test.html
>
>
> Now that we use Groovy more and more, I think we should really have a look a 
> Codenarc
> https://docs.gradle.org/current/userguide/codenarc_plugin.html
> We already discussed it at https://markmail.org/message/uigcpnxqgizhd2oi and 
> https://markmail.org/message/rp6njoiohkkiodbe
> We know it's a crucial task but not an easy but rather a long term one
> Here are some interesting links (before I delete my FF tabs group about it)
> http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html
> http://codenarc.sourceforge.net/codenarc-creating-ruleset.html
> https://github.com/gradle/gradle/tree/master/config
> https://stackoverflow.com/questions/14358471/how-to-generate-codenarc-report-for-main-and-test-classes-using-different-rule-s
> https://mrhaki.blogspot.com/2011/01/gradle-goodness-use-groovy-ruleset-file.html



--
This message was sent by Atlassian Jira
(v8.3.4#803005)