From b653291c29b67f522ff167ae51cf0ab0ddd7bf30 Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Mon, 11 Jul 2016 11:58:46 +0200 Subject: [PATCH] SONAR-7876 Add an API for Sensors to report files that can't be analyzed --- .../java/org/sonar/xoo/rule/AnalysisErrorSensorTest.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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); -- 2.39.5