-
Notifications
You must be signed in to change notification settings - Fork 136
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
Sonar 7.9 LTS warnings #278
Comments
Haven't tested but I hope this can solve our problem: diff --git a/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java b/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java
index 81d7cd0..6c19a39 100644
--- a/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java
+++ b/src/main/java/org/sonar/plugins/findbugs/FindbugsConfiguration.java
@@ -42,6 +42,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.sonar.api.CoreProperties;
import org.sonar.api.PropertyType;
+import org.sonar.api.Startable;
import org.sonar.api.batch.ScannerSide;
import org.sonar.api.batch.fs.FilePredicates;
import org.sonar.api.batch.fs.FileSystem;
@@ -62,7 +63,7 @@ import org.sonar.plugins.java.api.JavaResourceLocator;
import static java.lang.String.format;
@ScannerSide
-public class FindbugsConfiguration {
+public class FindbugsConfiguration implements Startable {
private static final Logger LOG = LoggerFactory.getLogger(FindbugsConfiguration.class);
@@ -117,7 +118,7 @@ public class FindbugsConfiguration {
LOG.warn("Findbugs needs sources to be compiled."
+ " Please build project before executing sonar or check the location of compiled classes to"
+ " make it possible for Findbugs to analyse your (sub)project ({}).", fileSystem.baseDir().getPath());
-
+
if (!isAllowUncompiledCode() && hasSourceFiles()) { //This excludes test source files
throw new IllegalStateException(format("One (sub)project contains Java source files that are not compiled (%s).",
fileSystem.baseDir().getPath()));
@@ -281,10 +282,16 @@ public class FindbugsConfiguration {
}
}
+ @Override
+ public void start() {
+ // do nothing
+ }
+
/**
* Invoked by PicoContainer to remove temporary files.
*/
@SuppressWarnings("RV_RETURN_VALUE_IGNORED_BAD_PRACTICE")
+ @Override
public void stop() {
if (jsr305Lib != null) {
jsr305Lib.delete(); |
Confirmed that our smoke-test reproduces this problem. I will try to make a topic-branch to confirm the fix. |
KengoTODA
added a commit
that referenced
this issue
Jul 15, 2019
Since SonarQube 7.9, plugin needs to implement org.sonar.api.Startable explicitly, or SQ reports warning during the code scan.
KengoTODA
added a commit
that referenced
this issue
Jul 15, 2019
Since SonarQube 7.9, plugin needs to implement org.sonar.api.Startable explicitly, or SQ reports warning during the code scan.
KengoTODA
added a commit
that referenced
this issue
Jul 17, 2019
Since SonarQube 7.9, plugin needs to implement org.sonar.api.Startable explicitly, or SQ reports warning during the code scan.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
When running with SonarQube 7.9 LTS the following warning comes from the sonar-maven-plugin:
Environment
The text was updated successfully, but these errors were encountered: