cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Podkowinski (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-13175) Integrate "Error Prone" Code Analyzer
Date Wed, 06 Sep 2017 11:11:00 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-13175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155175#comment-16155175
] 

Stefan Podkowinski edited comment on CASSANDRA-13175 at 9/6/17 11:10 AM:
-------------------------------------------------------------------------

We should probably first try to integrate errorprone in build.xml and make it run in circle
ci. Afterwards we can start filtering out more of the less useful warnings and start fixing
reasonable warnings in the code until we get clean (probably not in scope of this ticket).


I tried to give this a shot by creating a separate target for errorprone 2.1.1 in the build.xml
[here|https://github.com/spodkowinski/cassandra/tree/WIP-13175]. I also configured circleci.yaml
to use container 4 for that, but [results|https://circleci.com/gh/spodkowinski/cassandra/121#config/containers/3]
show a failed build due to an error that I can't reproduce locally. Running {{ant errorprone}}
on my branch completes successfully with only warnings using both oracle or openjdk. Guess
I have to use the same oracle version as on circle ci to reproduce. I also haven't encountered
linked github #711 issue, but it's marked as fixed with 2.1.1 already. 

Edit:
Running ant errorprone with the exact same version as circle ci (oracle64-1.8.0.102) still
completes fine locally on my linux machine..


was (Author: spodxx@gmail.com):
We should probably first try to integrate errorprone in build.xml and make it run in circle
ci. Afterwards we can start filtering out more of the less useful warnings and start fixing
reasonable warnings in the code until we get clean (probably not in scope of this ticket).


I tried to give this a shot by creating a separate target for errorprone 2.1.1 in the build.xml
[here|https://github.com/spodkowinski/cassandra/tree/WIP-13175]. I also configured circleci.yaml
to use container 4 for that, but [results|https://circleci.com/gh/spodkowinski/cassandra/121#config/containers/3]
show a failed build due to an error that I can't reproduce locally. Running {{ant errorprone}}
on my branch completes successfully with only warnings using both oracle or openjdk. Guess
I have to use the same oracle version as on circle ci to reproduce. I also haven't encountered
linked github #711 issue, but it's marked as fixed with 2.1.1 already. 

> Integrate "Error Prone" Code Analyzer
> -------------------------------------
>
>                 Key: CASSANDRA-13175
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-13175
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Stefan Podkowinski
>            Assignee: Stefan Podkowinski
>         Attachments: 0001-Add-Error-Prone-code-analyzer.patch, checks-2_2.out, checks-3_0.out,
checks-trunk.out
>
>
> I've been playing with [Error Prone|http://errorprone.info/] by integrating it into the
build process and to see what kind of warnings it would produce. So far I'm positively impressed
by the coverage and usefulness of some of the implemented checks. See attachments for results.
> Unfortunately there are still some issues on how the analyzer is effecting generated
code and used guava versions, see [#492|https://github.com/google/error-prone/issues/492].
In case those issues have been solved and the resulting code isn't affected by the analyzer,
I'd suggest to add it to trunk with warn only behaviour and some less useful checks disabled.
Alternatively a new ant target could be added, maybe with build breaking checks and CI integration.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message