findbugs

sonar findbugs heap size

匿名 (未验证) 提交于 2019-12-03 09:13:36
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i am new to sonar. i am running sonar from Jenkins with sonar pulgin. When i am running from jenkins i am getting out of memory exception at findbugs below is the error: Out of memory Total memory: 1037M free memory: 30M Analyzed: D:\Victor\autocreated\webapp\WEB-INF\classes Aux: C:\DOCUME~1\NADBHA~1\LOCALS~1\Temp\findbugs4165854405681394173.jar Aux: C:\DOCUME~1\NADBHA~1\LOCALS~1\Temp\findbugs4688505485649811865.jar Total time: 2:04:49.155s Final Memory: 358M/989M Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException:

Maven findbugs:check - Output Summary Of Bugs

人盡茶涼 提交于 2019-12-03 08:13:19
Does anybody know how to configure the maven findbugs plugin to output a summary of the bugs to the console (similar to the pmd plugin)? At present findbugs:check just prints out how many bugs there are in total and I need to check the individual modules target/findbugs directory and each findbugs.xml file to fix the issues. <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> <version>2.0.1</version> <configuration> <xmlOutput>true</xmlOutput> <xmlOutputDirectory>findbugsreports</xmlOutputDirectory> <findbugsXmlOutput>true</findbugsXmlOutput>

Problems with FindBugs exclude filter

一个人想着一个人 提交于 2019-12-03 07:31:02
I am in the process of evaluating FindBugs and am trying to make use of the excludeFilter so that the tool does not process the test packages or the generated ejb stubs. I have tried the following: <FindBugsFilter> <!-- Match any test packages --> <Match> <Package name="~.*\.test"/> </Match> <Match> <Or> <Class name="~.*\.^_*"/> <Class name="~.*EJS*"/> </Or> <Bug pattern="MALICIOUS_CODE"/> </Match> The generated EJB's are still being looked at. Can someone provide some better direction on this. I want to exclude out all classes that start with "_" Example: com/mycompany/business/admin/ejb/

FindBugs error: Write to static field from instance method

女生的网名这么多〃 提交于 2019-12-03 07:04:58
I have couple of areas in my application where I get the error while manipulating value of static variable from instance method. "Write to static field from instance method" . If we take multi-threading out of the equation, does this scenario pose any potential issue even if multiple instances write to the same static variable ? Not a bug From the documentation... This instance method writes to a static field. This is tricky to get correct if multiple instances are being manipulated, and generally bad practice. Firstly it says that it is a bad practice , not incorrect. Second thing is the

When using Eclipse with FindBugs can you mark a bug as not a bug and have it removed from the bug list?

别来无恙 提交于 2019-12-03 06:38:50
问题 FindBugs has found a potential bug in my code. But it is not a bug. Is it possible to mark this occurrence as 'not a bug' AND have it removed from the bug list? I have documented quite clearly why for each case it is not a bug. For example. A class implements the comparable interface. it has the compareTo method. I have however not overridden the equals method. FindBugs does not like this as the JavaDocs state that it is recommended that (x.compareTo(y)==0) == (x.equals(y)) Although in my

How to indicate that member fields are @Nonnull by default?

感情迁移 提交于 2019-12-03 05:42:48
My question is a follow-up to this one . In past versions of FindBugs, it was possible to use @DefaultAnnotation(Nonnull.class) or @DefaultAnnotationForFields(Nonnull.class) to indicate that all fields in a package should be treated as @Nonnull . In the current version of FindBugs (2.0), @DefaultAnnotation and @DefaultAnnotationForFields are deprecated, and we should all use JSR-305 instead. But JSR-305 doesn't seem to cover everything the (now deprecated) FindBugs annotations cover. The javadoc does suggest a number of alternatives: @ParametersAreNonnullByDefault . This (obviously) only

What is the meaning of Possible null pointer dereference in findbug?

北城以北 提交于 2019-12-03 05:16:23
I am using Sonar and I have got this kind of violation from it for a peace of my code: Correctness - Possible null pointer dereference Has anyone know about this rule in findbugs? I searched a lot but I can not find a good sample code (in Java) which describe this rule, unfortunately findbugs site did not have any sample code or good description about this rule. Why does this violation appear? SiB It says here NP: Possible null pointer dereference (NP_NULL_ON_SOME_PATH) There is a branch of statement that, if executed, guarantees that a null value will be dereferenced, which would generate a

Can not execute Findbugs Caused by: This project contains Java source files that are not compiled

北慕城南 提交于 2019-12-03 04:48:01
I am currently using the sonarqube server 5.6 with scanner 2.6.1 and I keep getting errors during analysis for a java project. It appears to complain about some java files not compiled in the binaries folder (there aren't any at all in the binaries folder). Once I add the -X parameter I get more exceptions (flagged as ignored), see below. any clues? sonar-project.properties followed by logs sonar.projectKey=myproj sonar.projectName=myproj sonar.projectVersion=1.1 sonar.branch=1.1 sonar.sources=./java sonar.binaries=./deploy sonar.log.level=DEBUG sonar.verbose=false sonar.sourceEncoding=UTF-8

Is there a Findbugs and / or PMD equivalent for C/C++? [closed]

感情迁移 提交于 2019-12-03 04:23:04
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 months ago . I was recently asked about alternatives to Coverity Prevent for a code base that includes both C/C++ and Java. Obviously, on the Java side, the free tools available include Findbugs (compiled code analysis) and PMD (static code analysis). They are very powerful, especially when you start investigating

javax.annotation: @Nullable vs @CheckForNull

筅森魡賤 提交于 2019-12-03 04:06:17
问题 What is the difference between the two? Both seem to mean that the value may be null and should be dealt with accordingly i.e. checked for null. Update: The two annotations above are part of JSR-305/FindBugs: http://findbugs.sourceforge.net/manual/annotations.html 回答1: I think it is pretty clear from the link you added: if you use @CheckForNull and the code that uses the value does not check for null , FindBugs will show it as an error. FindBugs will ignore @Nullable . In practice this