Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FINERACT-696 - add spotbug bug-pattern plugin #716

Merged
merged 1 commit into from Mar 13, 2020

Conversation

xurror
Copy link

@xurror xurror commented Mar 2, 2020

Description

While code reviewing #464, I came accross a catch & printStackTrace, which is of course wrong (it should instead be, correctly, logged, instead).

In an ideal world, it would not take human code review to catch this, but just an automated build failure. This is possible using SpotBugs (not FindBugs anymore; SpotBugs is the new FindBugs, it's a fully compatible successor) and https://github.com/KengoTODA/findbugs-slf4j/ (for this particular case KengoTODA/findbugs-slf4j#70, but using findbugs-slf4j for Fineract would have value even before that's implemented).

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

Our guidelines for code reviews is at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide

@xurror xurror changed the title FINERACT-696 FINERACT-696 - add spotbug bug-pattern plugin. Mar 3, 2020
@xurror xurror force-pushed the FINERACT-696 branch 2 times, most recently from f22d8a8 to 06501e4 Compare March 3, 2020 08:25
@xurror xurror closed this Mar 3, 2020
@xurror xurror reopened this Mar 3, 2020
@xurror xurror closed this Mar 3, 2020
@xurror xurror reopened this Mar 3, 2020
@xurror xurror closed this Mar 3, 2020
@xurror xurror reopened this Mar 3, 2020
@xurror xurror changed the title FINERACT-696 - add spotbug bug-pattern plugin. FINERACT-696 - add spotbug bug-pattern plugin Mar 3, 2020
@xurror xurror closed this Mar 3, 2020
@xurror xurror reopened this Mar 3, 2020
@xurror xurror closed this Mar 4, 2020
@xurror xurror reopened this Mar 4, 2020
@xurror xurror force-pushed the FINERACT-696 branch 2 times, most recently from a4a5c26 to 8320b04 Compare March 5, 2020 15:31
@awasum
Copy link
Contributor

awasum commented Mar 5, 2020

Looks like you have a spotbugs violation and possibly a Checkstyle voilation in this PR. Opening and closing n times may not solve this. run ./gradlew clean check to see the problem and fix them on local Dev env before sending PR:

See: https://travis-ci.org/apache/fineract/builds/658740697#L1963

You can also check the logs online via Travis.. Do you understand what I mean?

@vorburger
Copy link
Member

This still fails due to a hopefully simple to fix SpotBugs violation problem. This failure has nothing to do with the problems we are chasing in https://issues.apache.org/jira/browse/FINERACT-850 and sub-tasks.

@vorburger
Copy link
Member

@xurror actually I suspect that this probably now fails SpotBugs because it detects (many?) wrong log statements? We should just fix them all up, as part of this PR... I know it's a bit painful manual work, but "fixing all and immediately enforcing" is the only pattern that I know of to make something like this have any real lasting impact (similar to #715).

@xurror xurror force-pushed the FINERACT-696 branch 2 times, most recently from aba151a to f8e6f1f Compare March 10, 2020 12:05
@xurror
Copy link
Author

xurror commented Mar 10, 2020

@vorburger I already resolved them earlier today, it was actually quite long and boring but I think it's ready for merge

@vorburger vorburger self-requested a review March 10, 2020 15:58
Copy link
Member

@vorburger vorburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is GREAT! Thanks for this. I've spotted a few very minor points, if you could address those, and fix the rebase conflicts, we'll merge this ASAP!

@xurror xurror force-pushed the FINERACT-696 branch 2 times, most recently from d87fa21 to a543d0a Compare March 11, 2020 11:51
@xurror
Copy link
Author

xurror commented Mar 11, 2020

@vorburger,this is ready

add spotbug bug-pattern plugin.

Apply suggestions from code review

closes https://issues.apache.org/jira/browse/FINERACT-696

Co-Authored-By: Michael Vorburger ⛑️ <mike@vorburger.ch>
@vorburger vorburger merged commit f484f88 into apache:develop Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants