diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-07-11 11:58:46 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2016-07-11 11:58:46 +0200 |
commit | b653291c29b67f522ff167ae51cf0ab0ddd7bf30 (patch) | |
tree | 2cb8ada5651ee205ec39a6867725e80795b66e06 /plugins | |
parent | ae5a68d2050ec017ca30b9e770e3ce0a5beae806 (diff) | |
download | sonarqube-b653291c29b67f522ff167ae51cf0ab0ddd7bf30.tar.gz sonarqube-b653291c29b67f522ff167ae51cf0ab0ddd7bf30.zip |
SONAR-7876 Add an API for Sensors to report files that can't be analyzed
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java index 8067a67acb2..d39b66e80f9 100644 --- a/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java +++ b/plugins/sonar-xoo-plugin/src/test/java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java @@ -64,7 +64,11 @@ public class AnalysisErrorSensorTest { Path baseDir = temp.newFolder().toPath().toAbsolutePath(); createErrorFile(baseDir); - DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo").setLanguage("xoo"); + int[] offsets = {10, 20, 30, 40}; + DefaultInputFile inputFile = new DefaultInputFile("foo", "src/foo.xoo") + .setLanguage("xoo") + .setOriginalLineOffsets(offsets) + .setLines(4); context = SensorContextTester.create(baseDir); context.fileSystem().add(inputFile); |