You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Bolz, Michael" <mi...@sap.com> on 2014/07/16 14:31:25 UTC

Unused Import statements in OData V4

Hi,

After the last merge/commit/push from Fabio I get ~7000 unused import
warnings.
After a diff between the first and last commit and a grep for added import
lines:
"git diff b9f4b3c64c893d731d6d6ff326486c6667791388
599f1ef28b398cfd6aa444cda785863bcf61847a | grep +import | wc ­l"
I get ~ 8506 added import statements.

I would now remove all unused imports and then do a single commit to have a
"cleaned up import" state if there are no objections.
For future commits it would be nice to have a look into those warnings
before doing the push into the Git repo.

@All: Or should we add some "checkstyle" rules and enable the "checkstyle"
plugin? WDYT?

Kind regards,
Michael




Re: Unused Import statements in OData V4

Posted by "Bolz, Michael" <mi...@sap.com>.
Hi Fabio,

I don't know "pojogen" and if there is some way to configure the generated imports.
In addition IMHO automatically generated files should not be copied into "src/main/java" but in "src/gen/java" and then this path should be added to the classpath.
If 'pojogen' could not be configured for the generated imports we should exclude the generated files from checkstyle.
But in addition a "code clean up (e.g. via Eclipse)" should (could?) be done for the generated file when they are manually copied.
Or is this not possible?

Kind regards,
Michael


On 16.07.2014, at 17:00, Fabio Martelli <fa...@gmail.com> wrote:

> Il 16/07/2014 14:31, Bolz, Michael ha scritto:
>> Hi,
>> 
>> After the last merge/commit/push from Fabio I get ~7000 unused import warnings.
>> After a diff between the first and last commit and a grep for added import lines:
>> "git diff b9f4b3c64c893d731d6d6ff326486c6667791388 599f1ef28b398cfd6aa444cda785863bcf61847a | grep +import | wc –l"
>> I get ~ 8506 added import statements.
>> 
>> I would now remove all unused imports and then do a single commit to have a "cleaned up import" state if there are no objections.
>> For future commits it would be nice to have a look into those warnings before doing the push into the Git repo.
>> 
>> @All: Or should we add some "checkstyle" rules and enable the "checkstyle" plugin? WDYT?
> Hi Michael, those files are automatically generated by the pojogen and manually copied into fit for test purpose.
> Unfortunately, we cannot take care to generate files "checkstyle" compliant: this would be impossible.
> In the past, auto-generated test files have been excluded from checkstyle. Can we still continue in this direction?
> Alternative, can you suggest a simple way to clean those files?
> 
> Best regards,
> F.
> 
> -- 
> Fabio Martelli
> 
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
> 
> Apache Syncope PMC
> http://people.apache.org/~fmartelli/
> 


Re: Unused Import statements in OData V4

Posted by Fabio Martelli <fa...@gmail.com>.
Il 16/07/2014 14:31, Bolz, Michael ha scritto:
> Hi,
>
> After the last merge/commit/push from Fabio I get ~7000 unused import 
> warnings.
> After a diff between the first and last commit and a grep for added 
> import lines:
> "git diff b9f4b3c64c893d731d6d6ff326486c6667791388 
> 599f1ef28b398cfd6aa444cda785863bcf61847a | grep +import | wc –l"
> I get ~ 8506 added import statements.
>
> I would now remove all unused imports and then do a single commit to 
> have a "cleaned up import" state if there are no objections.
> For future commits it would be nice to have a look into those warnings 
> before doing the push into the Git repo.
>
> @All: Or should we add some "checkstyle" rules and enable the 
> "checkstyle" plugin? WDYT?
Hi Michael, those files are automatically generated by the pojogen and 
manually copied into fit for test purpose.
Unfortunately, we cannot take care to generate files "checkstyle" 
compliant: this would be impossible.
In the past, auto-generated test files have been excluded from 
checkstyle. Can we still continue in this direction?
Alternative, can you suggest a simple way to clean those files?

Best regards,
F.

-- 
Fabio Martelli

Tirasa - Open Source Excellence
http://www.tirasa.net/

Apache Syncope PMC
http://people.apache.org/~fmartelli/