Yes, it is considered best practice to avoid gstring usage when not needed.

Like for others, we can decide to not apply this rule.

The detailed rule from codenarc documentation :


*UnnecessaryGString** Rule*

/Since //CodeNarc// 0.13/

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.

Gil

21 janv. 2023 09:41:39 Jacques Le Roux <jacques.le.r...@les7arts.com>:

> Hi Gil,
> 
> So we need to use single quotes instead of double quotes now in Groovy?
> 
> Thanks
> 
> Jacques
> 
> Le 20/01/2023 à 17:01, Jacques Le Roux a écrit :
>> Thank you very much Gil,
>> 
>> +1 for a big squash... after some reviews...
>> 
>> Jacques
>> 
>> Le 20/01/2023 à 15:53, gil.portenseigne a écrit :
>>> Hello Devs,
>>> 
>>> That is with pleasure, that I managed to integrate into OFBiz framework
>>> (no plugins yet) Codenarc, and that the build is successful under java
>>> 17.
>>> 
>>> https://github.com/apache/ofbiz-framework/pull/517#issuecomment-1398487745
>>> 
>>> I tried to isolate rule fixes in separated commits, there are a lot (133
>>> commits), with some redundancy. But rebasing is not easy since files are
>>> modified by several rule fixing.
>>> 
>>> Integration and unit test are ok. I did some manual testing when I got
>>> some doubt, but it could be nice to have some more eyes on the subject.
>>> 
>>> After reviewing process, and if everything is fine, should we commit
>>> that as a big squash ?
>>> 
>>> WDYT
>>> 
>>> Regards,
>>> 
>>> Gil

Reply via email to