diff options
author | Julien HENRY <julien.henry@sonarsource.com> | 2018-11-29 17:07:21 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-01-16 09:43:04 +0100 |
commit | a00e567bffae6300381d11989bfda011d2f85aba (patch) | |
tree | c35be0ea15bdde4b352c6eb452e3ffe4bfd2083a /sonar-plugin-api | |
parent | b7d07953ea890469dca6f917399dba7edfd5f4ed (diff) | |
download | sonarqube-a00e567bffae6300381d11989bfda011d2f85aba.tar.gz sonarqube-a00e567bffae6300381d11989bfda011d2f85aba.zip |
SONAR-11465 Move post-job at project level
Diffstat (limited to 'sonar-plugin-api')
4 files changed, 6 insertions, 7 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/SensorStrategy.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/SensorStrategy.java index 62de7d120f8..adde73809f6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/SensorStrategy.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/SensorStrategy.java @@ -29,7 +29,7 @@ import org.sonar.api.batch.fs.InputFile; */ public class SensorStrategy { - private boolean global = false; + private boolean global = true; public boolean isGlobal() { return global; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/postjob/PostJob.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/postjob/PostJob.java index 659cdbf88e8..facf976fc6f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/postjob/PostJob.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/postjob/PostJob.java @@ -20,7 +20,7 @@ package org.sonar.api.batch.postjob; import org.sonar.api.ExtensionPoint; -import org.sonar.api.batch.ScannerSide; +import org.sonar.api.scanner.ScannerSide; /** * PostJobs are executed at the very end of scanner analysis. A PostJob can't do any modification @@ -29,6 +29,7 @@ import org.sonar.api.batch.ScannerSide; * asynchronous process to compute data on server side in 5.x series. * * @since 5.2 + * @since 7.6 postjobs are loaded in the project container */ @ScannerSide @ExtensionPoint diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java index 5fd89b5bb55..c31fe6c8b34 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java @@ -19,18 +19,15 @@ */ package org.sonar.api.batch.scm; -import org.sonar.api.batch.ScannerSide; -import org.sonar.api.batch.InstantiationStrategy; +import java.util.List; +import org.sonar.api.scanner.ScannerSide; import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.InputFile; -import java.util.List; - /** * This class should be implemented by SCM providers. * @since 5.0 */ -@InstantiationStrategy(InstantiationStrategy.PER_BATCH) @ScannerSide public abstract class BlameCommand { diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputFileTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputFileTest.java index c5e84f19f33..420f433557b 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputFileTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/batch/fs/internal/DefaultInputFileTest.java @@ -87,6 +87,7 @@ public class DefaultInputFileTest { assertThat(inputFile.getModuleRelativePath()).isEqualTo(MODULE_RELATIVE_PATH); assertThat(inputFile.getProjectRelativePath()).isEqualTo(PROJECT_RELATIVE_PATH); + sensorStrategy.setGlobal(false); assertThat(inputFile.relativePath()).isEqualTo(MODULE_RELATIVE_PATH); assertThat(new File(inputFile.relativePath())).isRelative(); sensorStrategy.setGlobal(true); |