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

Add Findbugs #618

Merged
merged 11 commits into from
Aug 8, 2016
Merged

Add Findbugs #618

merged 11 commits into from
Aug 8, 2016

Conversation

AustinShalit
Copy link
Member

Closes #615

I still need to go through and fix failing tests.

@codecov-io
Copy link

codecov-io commented Jul 8, 2016

Current coverage is 57.67% (diff: 66.66%)

Merging #618 into master will decrease coverage by <.01%

@@             master       #618   diff @@
==========================================
  Files           195        195          
  Lines          6089       6091     +2   
  Methods           0          0          
  Messages          0          0          
  Branches        554        554          
==========================================
+ Hits           3512       3513     +1   
- Misses         2413       2414     +1   
  Partials        164        164          

Sunburst

Powered by Codecov. Last update 547f897...f3c2248

def slurped = new XmlSlurper().parse(xmlReport.destination)
def bugsFound = slurped.BugInstance.size()
if (bugsFound > 0) {
new XmlNodePrinter().printList(slurped.BugInstance.list())
Copy link
Member Author

Choose a reason for hiding this comment

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

@JLLeitschuh I am doing something wrong here. Any idea how to make this work?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@AustinShalit @JLLeitschuh what's the problem? If it's not printing, it's likely because, to my knowledge, XmlNodePrinter requires an output (try passing System.out as a constructor argument)

# Conflicts:
#	.travis.yml
#	appveyor.yml
#	build.gradle
#	core/src/main/java/edu/wpi/grip/core/OperationDescription.java
@AustinShalit AustinShalit force-pushed the findbugs branch 2 times, most recently from 22437d5 to d3d5a9c Compare August 3, 2016 08:16
@AustinShalit
Copy link
Member Author

AustinShalit commented Aug 3, 2016

I am done for the night. Take a look at the errors that are left and let me know how you want to handle them. The xml gets easier to read after a while...

This guide is very useful: http://findbugs.sourceforge.net/bugDescriptions.html

Also, what do you think about getting this in for 2.0.0?

@ghost
Copy link

ghost commented Aug 3, 2016

Works on OS X 10.11.5 and Ubuntu 15.10 👍

@SamCarlberg
Copy link
Member

Should leave comments on the @SuppressFBWarnings annotations for why you're suppressing the warnings.

@@ -69,6 +71,7 @@
}

@Override
@SuppressFBWarnings("UW_UNCOND_WAIT") // Bug in FindBugs. There is a condition.
Copy link
Member

@JLLeitschuh JLLeitschuh Aug 4, 2016

Choose a reason for hiding this comment

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

There's actually a field in the warning that you can fill out called "justification"
http://findbugs.sourceforge.net/api/edu/umd/cs/findbugs/annotations/SuppressFBWarnings.html#justification()
So you can do @SuppressFBWarnings("UW_UNCOND_WAIT", justification = "Bug in FindBugs. There is a condition.")

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice. I updated the suppressions to use that.

# Conflicts:
#	.travis.yml
#	appveyor.yml
#	core/src/test/java/edu/wpi/grip/core/sources/CameraSourceTest.java
#	core/src/test/java/edu/wpi/grip/core/util/service/AutoRestartingServiceTest.java
@JLLeitschuh
Copy link
Member

This good?

@AustinShalit
Copy link
Member Author

Yup

@JLLeitschuh
Copy link
Member

JLLeitschuh commented Aug 8, 2016

@JLLeitschuh JLLeitschuh merged commit a2499ab into WPIRoboticsProjects:master Aug 8, 2016
@AustinShalit AustinShalit deleted the findbugs branch August 8, 2016 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Findbugs To build
5 participants