From 78c3386f53b1ac5fca1209f54c5bade2db6148c2 Mon Sep 17 00:00:00 2001 From: guwirth Date: Tue, 14 Jun 2016 14:31:25 +0200 Subject: [PATCH] mark deprecated SQ 5.6 API parts --- .../plugins/cxx/CxxCommonRulesDecorator.java | 2 +- .../org/sonar/plugins/cxx/CxxCpdMapping.java | 2 +- .../java/org/sonar/plugins/cxx/CxxPlugin.java | 2 +- .../plugins/cxx/compiler/CompilerParser.java | 4 ++-- .../cxx/compiler/CxxCompilerSensor.java | 6 ++--- .../cxx/compiler/CxxCompilerVcParser.java | 4 ++-- .../plugins/cxx/coverage/BullseyeParser.java | 6 ++--- .../plugins/cxx/coverage/CoberturaParser.java | 6 ++--- .../plugins/cxx/coverage/CoverageParser.java | 4 ++-- .../cxx/coverage/CxxCoverageSensor.java | 10 ++++----- .../plugins/cxx/cppcheck/CppcheckParser.java | 6 ++--- .../cxx/cppcheck/CppcheckParserV1.java | 6 ++--- .../cxx/cppcheck/CxxCppCheckSensor.java | 6 ++--- .../cxx/drmemory/CxxDrMemorySensor.java | 6 ++--- .../externalrules/CxxExternalRulesSensor.java | 8 +++---- .../sonar/plugins/cxx/rats/CxxRatsSensor.java | 6 ++--- .../plugins/cxx/squid/CxxSquidSensor.java | 12 +++++----- .../plugins/cxx/squid/DependencyAnalyzer.java | 16 +++++++------- .../plugins/cxx/squid/DirectoryEdge.java | 2 +- .../org/sonar/plugins/cxx/squid/FileEdge.java | 2 +- .../cxx/tests/xunit/CxxXunitSensor.java | 8 +++---- .../cxx/tests/xunit/XunitReportParser.java | 2 +- .../plugins/cxx/utils/CxxReportSensor.java | 12 +++++----- .../cxx/valgrind/CxxValgrindSensor.java | 6 ++--- .../cxx/valgrind/ValgrindReportParser.java | 6 ++--- .../plugins/cxx/veraxx/CxxVeraxxSensor.java | 8 +++---- .../cxx/CxxCommonRulesDecoratorTest.java | 2 +- .../java/org/sonar/plugins/cxx/TestUtils.java | 20 ++++++++--------- .../cxx/compiler/CxxCompilerSensorTest.java | 6 ++--- .../cxx/compiler/MockCxxCompilerSensor.java | 6 ++--- .../CxxBullseyeCoverageSensorTest.java | 22 +++++++++---------- .../cxx/coverage/CxxCoverageSensorTest.java | 8 +++---- .../cxx/cppcheck/CxxCppCheckSensorTest.java | 6 ++--- .../cxx/drmemory/CxxDrMemorySensorTest.java | 6 ++--- .../CxxExternalRulesSensorTest.java | 12 +++++----- .../cxx/pclint/CxxPCLintSensorTest.java | 12 +++++----- .../plugins/cxx/rats/CxxRatsSensorTest.java | 14 ++++++------ .../plugins/cxx/squid/CxxSquidSensorTest.java | 12 +++++----- .../CxxUnitTestResultsProviderTest.java | 4 ++-- .../cxx/tests/xunit/CxxXunitSensorTest.java | 10 ++++----- .../tests/xunit/XunitReportParserTest.java | 2 +- .../cxx/utils/CxxReportSensorTest.java | 6 ++--- .../cxx/valgrind/CxxValgrindSensorTest.java | 6 ++--- .../valgrind/ValgrindReportParserTest.java | 10 ++++----- .../cxx/veraxx/CxxVeraxxSensorTest.java | 6 ++--- 45 files changed, 164 insertions(+), 164 deletions(-) diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxCommonRulesDecorator.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxCommonRulesDecorator.java index f476652a47..5b8ea4838c 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxCommonRulesDecorator.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxCommonRulesDecorator.java @@ -21,7 +21,7 @@ import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.rule.CheckFactory; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.squidbridge.commonrules.api.CommonRulesDecorator; //@todo deprecated CommonRulesDecorator public class CxxCommonRulesDecorator extends CommonRulesDecorator { //@todo deprecated CommonRulesDecorator diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxCpdMapping.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxCpdMapping.java index 714a7e2cca..270a8ebc61 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxCpdMapping.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxCpdMapping.java @@ -23,7 +23,7 @@ import net.sourceforge.pmd.cpd.Tokenizer; //@todo deprecated -import org.sonar.api.batch.AbstractCpdMapping; +import org.sonar.api.batch.AbstractCpdMapping; //@todo deprecated import org.sonar.api.resources.Language; import org.sonar.api.batch.fs.FileSystem; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxPlugin.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxPlugin.java index 9cc1119fdd..491cea294a 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxPlugin.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/CxxPlugin.java @@ -24,7 +24,7 @@ import java.util.Arrays; import org.sonar.api.PropertyType; -import org.sonar.api.SonarPlugin; +import org.sonar.api.SonarPlugin; //@todo deprecated import org.sonar.api.config.PropertyDefinition; import org.sonar.api.resources.Qualifiers; import org.sonar.plugins.cxx.compiler.CxxCompilerGccParser; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CompilerParser.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CompilerParser.java index 70c6649017..eeefa4ad86 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CompilerParser.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CompilerParser.java @@ -23,8 +23,8 @@ import java.util.List; import java.util.Objects; -import org.sonar.api.batch.SensorContext; -import org.sonar.api.resources.Project; +import org.sonar.api.batch.SensorContext; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated /** * The interface a compiler parser has to implement in order to be used by diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CxxCompilerSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CxxCompilerSensor.java index 69db347afb..07cf9738ca 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CxxCompilerSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CxxCompilerSensor.java @@ -25,12 +25,12 @@ import java.util.LinkedList; import java.util.List; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.utils.CxxMetrics; import org.sonar.plugins.cxx.utils.CxxReportSensor; import org.sonar.plugins.cxx.utils.CxxUtils; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CxxCompilerVcParser.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CxxCompilerVcParser.java index 377450cf11..115585d92e 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CxxCompilerVcParser.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/compiler/CxxCompilerVcParser.java @@ -24,8 +24,8 @@ import java.util.Scanner; import java.util.regex.Pattern; import java.util.regex.MatchResult; -import org.sonar.api.batch.SensorContext; -import org.sonar.api.resources.Project; +import org.sonar.api.batch.SensorContext; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.utils.CxxUtils; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/BullseyeParser.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/BullseyeParser.java index 7dbde6587c..0578d4536b 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/BullseyeParser.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/BullseyeParser.java @@ -29,10 +29,10 @@ import org.codehaus.staxmate.in.SMHierarchicCursor; import org.codehaus.staxmate.in.SMInputCursor; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.measures.CoverageMeasuresBuilder; //@todo deprecated -import org.sonar.api.resources.Project; -import org.sonar.api.utils.StaxParser; +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.utils.StaxParser; //@todo deprecated import org.sonar.plugins.cxx.utils.CxxUtils; /** diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CoberturaParser.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CoberturaParser.java index 65ffb02ff1..2655ea5b05 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CoberturaParser.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CoberturaParser.java @@ -28,10 +28,10 @@ import org.codehaus.staxmate.in.SMHierarchicCursor; import org.codehaus.staxmate.in.SMInputCursor; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.measures.CoverageMeasuresBuilder; //@todo deprecated -import org.sonar.api.resources.Project; -import org.sonar.api.utils.StaxParser; +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.utils.StaxParser; //@todo deprecated import org.sonar.plugins.cxx.utils.CxxUtils; /** diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CoverageParser.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CoverageParser.java index 1674c512fa..9d226a0623 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CoverageParser.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CoverageParser.java @@ -23,10 +23,10 @@ import java.util.Map; import javax.xml.stream.XMLStreamException; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.measures.CoverageMeasuresBuilder; //@todo deprecated -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated /** * The interface a coverage report parser has to implement in order to be used diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CxxCoverageSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CxxCoverageSensor.java index ee5baa19e9..554569ffa1 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CxxCoverageSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/coverage/CxxCoverageSensor.java @@ -28,18 +28,18 @@ import javax.xml.stream.XMLStreamException; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.FilePredicates; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.config.Settings; import org.sonar.api.measures.CoreMetrics; import org.sonar.api.measures.CoverageMeasuresBuilder; //@todo deprecated CoverageMeasuresBuilder -import org.sonar.api.measures.Measure; +import org.sonar.api.measures.Measure; //@todo deprecated import org.sonar.api.measures.Metric; -import org.sonar.api.measures.PropertiesBuilder; -import org.sonar.api.resources.Project; -import org.sonar.api.resources.Resource; +import org.sonar.api.measures.PropertiesBuilder; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.resources.Resource; //@todo deprecated import org.sonar.plugins.cxx.CxxLanguage; import org.sonar.plugins.cxx.utils.CxxReportSensor; import org.sonar.plugins.cxx.utils.CxxUtils; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CppcheckParser.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CppcheckParser.java index 182d826bd7..ca6a24b210 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CppcheckParser.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CppcheckParser.java @@ -21,11 +21,11 @@ import java.io.File; -import org.sonar.api.batch.SensorContext; -import org.sonar.api.resources.Project; +import org.sonar.api.batch.SensorContext; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated public interface CppcheckParser { - void processReport(final Project project, SensorContext context, File report) + void processReport(final Project project, SensorContext context, File report) //@todo deprecated Project, SensorContext throws javax.xml.stream.XMLStreamException; } diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CppcheckParserV1.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CppcheckParserV1.java index 8cf1d90f74..227108e00b 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CppcheckParserV1.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CppcheckParserV1.java @@ -25,9 +25,9 @@ import org.codehaus.staxmate.in.SMHierarchicCursor; import org.codehaus.staxmate.in.SMInputCursor; -import org.sonar.api.batch.SensorContext; -import org.sonar.api.resources.Project; -import org.sonar.api.utils.StaxParser; +import org.sonar.api.batch.SensorContext; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.utils.StaxParser; //@todo deprecated import org.sonar.plugins.cxx.utils.CxxUtils; import org.sonar.plugins.cxx.utils.EmptyReportException; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CxxCppCheckSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CxxCppCheckSensor.java index ed7a529428..7e92e2316d 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CxxCppCheckSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/cppcheck/CxxCppCheckSensor.java @@ -25,12 +25,12 @@ import javax.xml.stream.XMLStreamException; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.utils.CxxMetrics; import org.sonar.plugins.cxx.utils.CxxReportSensor; import org.sonar.plugins.cxx.utils.CxxUtils; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/drmemory/CxxDrMemorySensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/drmemory/CxxDrMemorySensor.java index 5da99895f4..8ecb9d1e99 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/drmemory/CxxDrMemorySensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/drmemory/CxxDrMemorySensor.java @@ -22,13 +22,13 @@ import java.io.File; import java.io.IOException; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.InputFile; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.drmemory.DrMemoryParser.DrMemoryError; import org.sonar.plugins.cxx.drmemory.DrMemoryParser.DrMemoryError.Location; import org.sonar.plugins.cxx.utils.CxxMetrics; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/externalrules/CxxExternalRulesSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/externalrules/CxxExternalRulesSensor.java index b3a8dbe9be..2e77cea879 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/externalrules/CxxExternalRulesSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/externalrules/CxxExternalRulesSensor.java @@ -25,13 +25,13 @@ import org.codehaus.staxmate.in.SMHierarchicCursor; import org.codehaus.staxmate.in.SMInputCursor; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; -import org.sonar.api.utils.StaxParser; +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.utils.StaxParser; //@todo deprecated import org.sonar.plugins.cxx.utils.CxxMetrics; import org.sonar.plugins.cxx.utils.CxxReportSensor; import org.sonar.plugins.cxx.utils.CxxUtils; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/rats/CxxRatsSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/rats/CxxRatsSensor.java index 24827d1100..f25d752052 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/rats/CxxRatsSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/rats/CxxRatsSensor.java @@ -24,12 +24,12 @@ import org.jdom.Element; import org.jdom.input.SAXBuilder; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.utils.CxxMetrics; import org.sonar.plugins.cxx.utils.CxxReportSensor; import org.sonar.plugins.cxx.utils.CxxUtils; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/CxxSquidSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/CxxSquidSensor.java index 5a71f6ebf6..2a060fa645 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/CxxSquidSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/CxxSquidSensor.java @@ -28,24 +28,24 @@ import javax.annotation.Nullable; -import org.sonar.api.batch.Sensor; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.Sensor; //@todo deprecated +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.FilePredicates; import org.sonar.api.batch.fs.FilePredicate; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.rule.ActiveRules; import org.sonar.api.batch.rule.CheckFactory; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.component.Perspective; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.measures.CoreMetrics; -import org.sonar.api.measures.Measure; -import org.sonar.api.measures.PersistenceMode; +import org.sonar.api.measures.Measure; //@todo deprecated +import org.sonar.api.measures.PersistenceMode; //@todo deprecated import org.sonar.api.measures.RangeDistributionBuilder; //@todo deprecated -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.cxx.CxxAstScanner; import org.sonar.cxx.CxxConfiguration; import org.sonar.cxx.api.CxxMetric; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/DependencyAnalyzer.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/DependencyAnalyzer.java index a886e63ea5..4205e4343c 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/DependencyAnalyzer.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/DependencyAnalyzer.java @@ -24,22 +24,22 @@ import java.util.Set; import java.util.Map; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.rule.ActiveRules; import org.sonar.api.batch.rule.ActiveRule; import org.sonar.api.batch.fs.InputFile; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.design.Dependency; //@todo deprecated import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.measures.CoreMetrics; -import org.sonar.api.measures.Measure; +import org.sonar.api.measures.Measure; //@todo deprecated import org.sonar.api.measures.Metric; -import org.sonar.api.measures.PersistenceMode; -import org.sonar.api.resources.Directory; -import org.sonar.api.resources.File; -import org.sonar.api.resources.Project; -import org.sonar.api.resources.Resource; +import org.sonar.api.measures.PersistenceMode; //@todo deprecated +import org.sonar.api.resources.Directory; //@todo deprecated +import org.sonar.api.resources.File; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.resources.Resource; //@todo deprecated import org.sonar.cxx.checks.CycleBetweenPackagesCheck; import org.sonar.cxx.checks.DuplicatedIncludeCheck; import org.sonar.cxx.preprocessor.CxxPreprocessor; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/DirectoryEdge.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/DirectoryEdge.java index 875f08ae86..350a392083 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/DirectoryEdge.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/DirectoryEdge.java @@ -23,7 +23,7 @@ import java.util.HashSet; import java.util.Set; -import org.sonar.api.resources.Directory; +import org.sonar.api.resources.Directory; //@todo deprecated import org.sonar.graph.Edge; class DirectoryEdge implements Edge { diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/FileEdge.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/FileEdge.java index b9760af731..4aa1bb37c3 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/FileEdge.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/squid/FileEdge.java @@ -19,7 +19,7 @@ */ package org.sonar.plugins.cxx.squid; -import org.sonar.api.resources.File; +import org.sonar.api.resources.File; //@todo deprecated import org.sonar.graph.Edge; class FileEdge implements Edge { diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/tests/xunit/CxxXunitSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/tests/xunit/CxxXunitSensor.java index b776dff7f9..51246cc6c7 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/tests/xunit/CxxXunitSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/tests/xunit/CxxXunitSensor.java @@ -42,15 +42,15 @@ import org.sonar.api.batch.CoverageExtension; //@todo deprecated import org.sonar.api.batch.DependsUpon; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.FilePredicates; import org.sonar.api.config.Settings; import org.sonar.api.measures.CoreMetrics; -import org.sonar.api.measures.Measure; -import org.sonar.api.resources.Project; +import org.sonar.api.measures.Measure; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.api.utils.ParsingUtils; -import org.sonar.api.utils.StaxParser; +import org.sonar.api.utils.StaxParser; //@todo deprecated import org.sonar.cxx.CxxAstScanner; import org.sonar.cxx.CxxConfiguration; import org.sonar.plugins.cxx.CxxLanguage; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/tests/xunit/XunitReportParser.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/tests/xunit/XunitReportParser.java index f473817a70..1d8d0d87a5 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/tests/xunit/XunitReportParser.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/tests/xunit/XunitReportParser.java @@ -30,7 +30,7 @@ import org.codehaus.staxmate.in.SMHierarchicCursor; import org.codehaus.staxmate.in.SMInputCursor; import org.sonar.api.utils.ParsingUtils; -import org.sonar.api.utils.StaxParser.XmlStreamHandler; +import org.sonar.api.utils.StaxParser.XmlStreamHandler; //@todo deprecated StaxParser import org.sonar.plugins.cxx.utils.EmptyReportException; /** diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/utils/CxxReportSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/utils/CxxReportSensor.java index 28e1cb6fef..4fb7398452 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/utils/CxxReportSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/utils/CxxReportSensor.java @@ -27,17 +27,17 @@ import java.util.Set; import org.apache.commons.io.FilenameUtils; import org.apache.tools.ant.DirectoryScanner; -import org.sonar.api.batch.Sensor; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.Sensor; //@todo deprecated +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.InputFile; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; -import org.sonar.api.measures.Measure; +import org.sonar.api.measures.Measure; //@todo deprecated import org.sonar.api.measures.Metric; -import org.sonar.api.resources.Project; -import org.sonar.api.resources.Resource; +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.resources.Resource; //@todo deprecated import org.sonar.api.rule.RuleKey; import org.sonar.plugins.cxx.CxxLanguage; import org.sonar.api.config.Settings; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/valgrind/CxxValgrindSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/valgrind/CxxValgrindSensor.java index f33e7c9e43..70f1b59832 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/valgrind/CxxValgrindSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/valgrind/CxxValgrindSensor.java @@ -22,12 +22,12 @@ import java.io.File; import java.util.Set; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.utils.CxxMetrics; import org.sonar.plugins.cxx.utils.CxxReportSensor; import org.sonar.plugins.cxx.utils.CxxUtils; diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/valgrind/ValgrindReportParser.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/valgrind/ValgrindReportParser.java index cbd65cd0b4..d6e234678a 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/valgrind/ValgrindReportParser.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/valgrind/ValgrindReportParser.java @@ -25,9 +25,9 @@ import org.codehaus.staxmate.in.SMHierarchicCursor; import org.codehaus.staxmate.in.SMInputCursor; -import org.sonar.api.batch.SensorContext; -import org.sonar.api.resources.Project; -import org.sonar.api.utils.StaxParser; +import org.sonar.api.batch.SensorContext; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.utils.StaxParser; //@todo deprecated import org.sonar.plugins.cxx.utils.EmptyReportException; class ValgrindReportParser { diff --git a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/veraxx/CxxVeraxxSensor.java b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/veraxx/CxxVeraxxSensor.java index 02ed8bffe7..fa8daa40aa 100644 --- a/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/veraxx/CxxVeraxxSensor.java +++ b/sonar-cxx-plugin/src/main/java/org/sonar/plugins/cxx/veraxx/CxxVeraxxSensor.java @@ -23,13 +23,13 @@ import org.codehaus.staxmate.in.SMHierarchicCursor; import org.codehaus.staxmate.in.SMInputCursor; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; -import org.sonar.api.utils.StaxParser; +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.utils.StaxParser; //@todo deprecated import org.sonar.plugins.cxx.utils.CxxMetrics; import org.sonar.plugins.cxx.utils.CxxReportSensor; import org.sonar.plugins.cxx.utils.CxxUtils; diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/CxxCommonRulesDecoratorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/CxxCommonRulesDecoratorTest.java index 59aa882d16..59c99e367c 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/CxxCommonRulesDecoratorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/CxxCommonRulesDecoratorTest.java @@ -25,7 +25,7 @@ import org.junit.Test; import org.sonar.api.batch.rule.CheckFactory; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.batch.fs.internal.DefaultFileSystem; public class CxxCommonRulesDecoratorTest { diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/TestUtils.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/TestUtils.java index 58007f325a..642d449325 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/TestUtils.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/TestUtils.java @@ -35,12 +35,12 @@ import org.sonar.api.batch.fs.InputFile.Type; import org.sonar.api.batch.fs.internal.DefaultFileSystem; import org.sonar.api.batch.fs.internal.DefaultInputFile; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; -import org.sonar.api.resources.Project; -import org.sonar.api.resources.Resource; +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.resources.Resource; //@todo deprecated import org.sonar.api.rule.RuleKey; public class TestUtils { @@ -61,9 +61,9 @@ public static Issuable mockIssuable() { return issuable; } - public static ResourcePerspectives mockPerspectives(Issuable issuable) { - ResourcePerspectives perspectives = mock(ResourcePerspectives.class); - when(perspectives.as((Class) anyObject(), (Resource) anyObject())).thenReturn(issuable); + public static ResourcePerspectives mockPerspectives(Issuable issuable) { //@todo deprecated ResourcePerspectives + ResourcePerspectives perspectives = mock(ResourcePerspectives.class); //@todo deprecated ResourcePerspectives + when(perspectives.as((Class) anyObject(), (Resource) anyObject())).thenReturn(issuable); //@todo deprecated Resource return perspectives; } @@ -82,7 +82,7 @@ public static File loadResource(String resourceName) { /** * Creates a default project mock */ - public static Project mockProject() { + public static Project mockProject() { //@todo deprecated Project return mockProject(loadResource("/org/sonar/plugins/cxx/reports-project")); } @@ -92,8 +92,8 @@ public static Project mockProject() { * @param baseDir project root directory * @return mocked project */ - public static Project mockProject(File baseDir) { - Project project = mock(Project.class); + public static Project mockProject(File baseDir) { //@todo deprecated Project + Project project = mock(Project.class); //@todo deprecated Project return project; } @@ -141,7 +141,7 @@ public static CxxLanguage mockCxxLanguage() { } public static DefaultInputFile addInputFile(DefaultFileSystem fs, - ResourcePerspectives perspectives, + ResourcePerspectives perspectives, //@todo deprecated ResourcePerspectives Issuable issuable, String path) { File file = new File(path); diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/compiler/CxxCompilerSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/compiler/CxxCompilerSensorTest.java index 6ac1c97cb8..3f257da472 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/compiler/CxxCompilerSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/compiler/CxxCompilerSensorTest.java @@ -19,14 +19,14 @@ */ package org.sonar.plugins.cxx.compiler; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.internal.DefaultFileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; import org.junit.Before; diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/compiler/MockCxxCompilerSensor.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/compiler/MockCxxCompilerSensor.java index 338b69dc5f..6137bc61fb 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/compiler/MockCxxCompilerSensor.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/compiler/MockCxxCompilerSensor.java @@ -31,12 +31,12 @@ import org.junit.Assert; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated public class MockCxxCompilerSensor extends CxxCompilerSensor { diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/coverage/CxxBullseyeCoverageSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/coverage/CxxBullseyeCoverageSensorTest.java index 162d71f840..042f47ae2b 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/coverage/CxxBullseyeCoverageSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/coverage/CxxBullseyeCoverageSensorTest.java @@ -19,13 +19,13 @@ */ package org.sonar.plugins.cxx.coverage; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.internal.DefaultFileSystem; import org.sonar.api.config.Settings; -import org.sonar.api.measures.Measure; -import org.sonar.api.resources.Project; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.measures.Measure; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.issue.Issuable; import org.sonar.plugins.cxx.TestUtils; @@ -42,11 +42,11 @@ public class CxxBullseyeCoverageSensorTest { private CxxCoverageSensor sensor; - private SensorContext context; - private Project project; + private SensorContext context; //@todo deprecated + private Project project; //@todo deprecated private DefaultFileSystem fs; private Issuable issuable; - private ResourcePerspectives perspectives; + private ResourcePerspectives perspectives; //@todo deprecated @Before public void setUp() { @@ -54,7 +54,7 @@ public void setUp() { issuable = TestUtils.mockIssuable(); perspectives = TestUtils.mockPerspectives(issuable); fs = TestUtils.mockFileSystem(); - context = mock(SensorContext.class); + context = mock(SensorContext.class); //@todo deprecated } //@Test @todo @@ -91,7 +91,7 @@ public void shouldReportCorrectCoverage() { } sensor = new CxxCoverageSensor(settings, fs, new CxxCoverageCache()); sensor.analyse(project, context); - verify(context, times(90)).saveMeasure((InputFile) anyObject(), any(Measure.class)); + verify(context, times(90)).saveMeasure((InputFile) anyObject(), any(Measure.class)); //@todo deprecated Measure } //@Test @todo @@ -112,7 +112,7 @@ public void shoulParseTopLevelFiles() { } sensor = new CxxCoverageSensor(settings, fs, new CxxCoverageCache()); sensor.analyse(project, context); - verify(context, times(28)).saveMeasure((InputFile) anyObject(), any(Measure.class)); + verify(context, times(28)).saveMeasure((InputFile) anyObject(), any(Measure.class)); //@todo deprecated Measure } //@Test @todo @@ -133,6 +133,6 @@ public void shoulCorrectlyHandleDriveLettersWithoutSlash() { } sensor = new CxxCoverageSensor(settings, fs, new CxxCoverageCache()); sensor.analyse(project, context); - verify(context, times(28)).saveMeasure((InputFile) anyObject(), any(Measure.class)); + verify(context, times(28)).saveMeasure((InputFile) anyObject(), any(Measure.class)); //@todo deprecated Measure } } diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/coverage/CxxCoverageSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/coverage/CxxCoverageSensorTest.java index ba5d176bcb..3897ed0e95 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/coverage/CxxCoverageSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/coverage/CxxCoverageSensorTest.java @@ -19,13 +19,13 @@ */ package org.sonar.plugins.cxx.coverage; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.internal.DefaultFileSystem; import org.sonar.api.config.Settings; -import org.sonar.api.measures.Measure; -import org.sonar.api.resources.Project; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.measures.Measure; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.issue.Issuable; import org.sonar.plugins.cxx.TestUtils; diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/cppcheck/CxxCppCheckSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/cppcheck/CxxCppCheckSensorTest.java index bd24ed3bc3..c32ee598e6 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/cppcheck/CxxCppCheckSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/cppcheck/CxxCppCheckSensorTest.java @@ -19,14 +19,14 @@ */ package org.sonar.plugins.cxx.cppcheck; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.internal.DefaultFileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; import org.junit.Before; diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/drmemory/CxxDrMemorySensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/drmemory/CxxDrMemorySensorTest.java index cbf3538cf0..22a2112198 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/drmemory/CxxDrMemorySensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/drmemory/CxxDrMemorySensorTest.java @@ -26,14 +26,14 @@ import org.junit.Before; import org.junit.Test; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.internal.DefaultFileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; public class CxxDrMemorySensorTest { diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/externalrules/CxxExternalRulesSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/externalrules/CxxExternalRulesSensorTest.java index 94ce5b4d88..88498977f3 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/externalrules/CxxExternalRulesSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/externalrules/CxxExternalRulesSensorTest.java @@ -19,14 +19,14 @@ */ package org.sonar.plugins.cxx.externalrules; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.internal.DefaultFileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; import org.junit.Before; @@ -40,8 +40,8 @@ public class CxxExternalRulesSensorTest { private CxxExternalRulesSensor sensor; - private SensorContext context; - private Project project; + private SensorContext context; //@todo deprecated + private Project project; //@todo deprecated private RulesProfile profile; private Settings settings; private DefaultFileSystem fs; @@ -55,7 +55,7 @@ public void setUp() { perspectives = TestUtils.mockPerspectives(issuable); fs = TestUtils.mockFileSystem(); profile = mock(RulesProfile.class); - context = mock(SensorContext.class); + context = mock(SensorContext.class); //@todo deprecated settings = new Settings(); } diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/pclint/CxxPCLintSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/pclint/CxxPCLintSensorTest.java index 3ba797898e..bff9f17b48 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/pclint/CxxPCLintSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/pclint/CxxPCLintSensorTest.java @@ -19,14 +19,14 @@ */ package org.sonar.plugins.cxx.pclint; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.internal.DefaultFileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; import org.junit.Before; @@ -39,10 +39,10 @@ public class CxxPCLintSensorTest { - private SensorContext context; - private Project project; + private SensorContext context; //@todo deprecated + private Project project; //@todo deprecated private RulesProfile profile; - private ResourcePerspectives perspectives; + private ResourcePerspectives perspectives; //@todo deprecated private Issuable issuable; private DefaultFileSystem fs; diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/rats/CxxRatsSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/rats/CxxRatsSensorTest.java index 11d2b833fe..58c4be709f 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/rats/CxxRatsSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/rats/CxxRatsSensorTest.java @@ -19,14 +19,14 @@ */ package org.sonar.plugins.cxx.rats; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.internal.DefaultFileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; import org.junit.Before; @@ -40,11 +40,11 @@ public class CxxRatsSensorTest { private CxxRatsSensor sensor; - private SensorContext context; - private Project project; + private SensorContext context; //@todo deprecated + private Project project; //@todo deprecated private DefaultFileSystem fs; private Issuable issuable; - private ResourcePerspectives perspectives; + private ResourcePerspectives perspectives; //@todo deprecated @Before public void setUp() { @@ -55,7 +55,7 @@ public void setUp() { Settings settings = new Settings(); settings.setProperty(CxxRatsSensor.REPORT_PATH_KEY, "rats-reports/rats-result-*.xml"); sensor = new CxxRatsSensor(perspectives, settings, fs, mock(RulesProfile.class)); - context = mock(SensorContext.class); + context = mock(SensorContext.class); //@todo deprecated } @Test diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/squid/CxxSquidSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/squid/CxxSquidSensorTest.java index 169b2ed112..5f661e68a2 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/squid/CxxSquidSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/squid/CxxSquidSensorTest.java @@ -35,19 +35,19 @@ import org.junit.Before; import org.junit.Test; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.rule.CheckFactory; import org.sonar.api.batch.rule.ActiveRules; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.measures.CoreMetrics; -import org.sonar.api.resources.Directory; -import org.sonar.api.resources.Project; -import org.sonar.api.resources.Resource; +import org.sonar.api.resources.Directory; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.resources.Resource; //@todo deprecated import org.sonar.plugins.cxx.CxxPlugin; import org.sonar.plugins.cxx.TestUtils; -import org.sonar.api.source.Highlightable; +import org.sonar.api.source.Highlightable; //@todo deprecated import org.sonar.api.batch.fs.InputFile; public class CxxSquidSensorTest { diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/dotnet/CxxUnitTestResultsProviderTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/dotnet/CxxUnitTestResultsProviderTest.java index 6d2561e89b..c67ca388f1 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/dotnet/CxxUnitTestResultsProviderTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/dotnet/CxxUnitTestResultsProviderTest.java @@ -32,8 +32,8 @@ import org.mockito.Mockito; import org.sonar.api.measures.Metric; -import org.sonar.api.resources.Project; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.resources.Project; //@todo deprecated +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.internal.DefaultFileSystem; import org.sonar.plugins.cxx.TestUtils; import org.sonar.plugins.cxx.tests.dotnet.CxxUnitTestResultsProvider.CxxUnitTestResultsAggregator; diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/xunit/CxxXunitSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/xunit/CxxXunitSensorTest.java index 85606b5e36..97bc83114e 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/xunit/CxxXunitSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/xunit/CxxXunitSensorTest.java @@ -34,18 +34,18 @@ import org.junit.Before; import org.junit.Test; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.config.Settings; import org.sonar.api.measures.CoreMetrics; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; public class CxxXunitSensorTest { private CxxXunitSensor sensor; - private SensorContext context; - private Project project; + private SensorContext context; //@todo deprecated + private Project project; //@todo deprecated private FileSystem fs; private Settings settings; @@ -54,7 +54,7 @@ public void setUp() { project = TestUtils.mockProject(); fs = TestUtils.mockFileSystem(); settings = new Settings(); - context = mock(SensorContext.class); + context = mock(SensorContext.class); //@todo deprecated sensor = new CxxXunitSensor(settings, fs); } diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/xunit/XunitReportParserTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/xunit/XunitReportParserTest.java index 53a1b31967..446b313c3a 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/xunit/XunitReportParserTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/tests/xunit/XunitReportParserTest.java @@ -26,7 +26,7 @@ import java.util.TreeMap; import org.junit.Test; -import org.sonar.api.utils.StaxParser; +import org.sonar.api.utils.StaxParser; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; public class XunitReportParserTest { diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/utils/CxxReportSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/utils/CxxReportSensorTest.java index ca9be0415a..f42bb33ac5 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/utils/CxxReportSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/utils/CxxReportSensorTest.java @@ -23,11 +23,11 @@ import java.util.List; import org.junit.Before; import org.junit.Test; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.config.Settings; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; public class CxxReportSensorTest { @@ -44,7 +44,7 @@ public CxxReportSensorImpl(Settings settings, FileSystem fs) { } @Override - public void analyse(Project p, SensorContext sc) { + public void analyse(Project p, SensorContext sc) { //@todo deprecated Project, SensorContext } }; diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/valgrind/CxxValgrindSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/valgrind/CxxValgrindSensorTest.java index bd3d64fcdb..6f39d21689 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/valgrind/CxxValgrindSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/valgrind/CxxValgrindSensorTest.java @@ -31,14 +31,14 @@ import org.junit.Before; import org.junit.Test; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.internal.DefaultFileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; public class CxxValgrindSensorTest { diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/valgrind/ValgrindReportParserTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/valgrind/ValgrindReportParserTest.java index bcc846b715..18b41f4e32 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/valgrind/ValgrindReportParserTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/valgrind/ValgrindReportParserTest.java @@ -27,20 +27,20 @@ import org.junit.Before; import org.junit.Test; import static org.mockito.Mockito.mock; -import org.sonar.api.batch.SensorContext; -import org.sonar.api.resources.Project; +import org.sonar.api.batch.SensorContext; //@todo deprecated +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; public class ValgrindReportParserTest { - private Project project; - private SensorContext context; + private Project project; //@todo deprecated + private SensorContext context; //@todo deprecated private ValgrindReportParser parser; @Before public void setUp() { project = TestUtils.mockProject(); - context = mock(SensorContext.class); + context = mock(SensorContext.class); //@todo deprecated parser = new ValgrindReportParser(); } diff --git a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/veraxx/CxxVeraxxSensorTest.java b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/veraxx/CxxVeraxxSensorTest.java index dadbd838ab..7bd76dfa4b 100644 --- a/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/veraxx/CxxVeraxxSensorTest.java +++ b/sonar-cxx-plugin/src/test/java/org/sonar/plugins/cxx/veraxx/CxxVeraxxSensorTest.java @@ -19,14 +19,14 @@ */ package org.sonar.plugins.cxx.veraxx; -import org.sonar.api.batch.SensorContext; +import org.sonar.api.batch.SensorContext; //@todo deprecated import org.sonar.api.batch.fs.internal.DefaultFileSystem; -import org.sonar.api.component.ResourcePerspectives; +import org.sonar.api.component.ResourcePerspectives; //@todo deprecated import org.sonar.api.config.Settings; import org.sonar.api.issue.Issuable; import org.sonar.api.issue.Issue; import org.sonar.api.profiles.RulesProfile; -import org.sonar.api.resources.Project; +import org.sonar.api.resources.Project; //@todo deprecated import org.sonar.plugins.cxx.TestUtils; import org.junit.Before;