@Test public void cancelled_analysis() { InputFile inputFile = inputFile("file1.yaml"); activeRules = (new ActiveRulesBuilder()).build(); context.setCancelled(true); sensor().execute(context); assertThat(context.allAnalysisErrors()).isEmpty(); }
@Override public void execute(SensorContext context) { FilePredicates p = context.fileSystem().predicates(); OpenApiProperties openApiProperties = new OpenApiProperties(); scanFiles(context, p, openApiProperties.getV2FilesPattern(context), true); scanFiles(context, p, openApiProperties.getV3FilesPattern(context), false); }
OpenApiScannerSensor implements Sensor { @Override public void execute(SensorContext context) { FilePredicates p = context.fileSystem().predicates(); OpenApiProperties openApiProperties = new OpenApiProperties(); scanFiles(context, p, openApiProperties.getV2FilesPattern(context), true); scanFiles(context, p, openApiProperties.getV3FilesPattern(context), false); } }
OpenApiScannerSensor implements Sensor { @Override public void execute(SensorContext context) { FilePredicates p = context.fileSystem().predicates(); OpenApiProperties openApiProperties = new OpenApiProperties(); scanFiles(context, p, openApiProperties.getV2FilesPattern(context), true); scanFiles(context, p, openApiProperties.getV3FilesPattern(context), false); } OpenApiScannerSensor(CheckFactory checkFactory, FileLinesContextFactory fileLinesContextFactory, NoSonarFilter noSonarFilter);  OpenApiScannerSensor(CheckFactory checkFactory, FileLinesContextFactory fileLinesContextFactory, NoSonarFilter noSonarFilter, @Nullable OpenApiCustomRuleRepository[] customRuleRepositories); }
OpenApiScannerSensor implements Sensor { @Override public void execute(SensorContext context) { FilePredicates p = context.fileSystem().predicates(); OpenApiProperties openApiProperties = new OpenApiProperties(); scanFiles(context, p, openApiProperties.getV2FilesPattern(context), true); scanFiles(context, p, openApiProperties.getV3FilesPattern(context), false); } OpenApiScannerSensor(CheckFactory checkFactory, FileLinesContextFactory fileLinesContextFactory, NoSonarFilter noSonarFilter);  OpenApiScannerSensor(CheckFactory checkFactory, FileLinesContextFactory fileLinesContextFactory, NoSonarFilter noSonarFilter, @Nullable OpenApiCustomRuleRepository[] customRuleRepositories); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); void scanFiles(SensorContext context, FilePredicates p, String[] pathPatterns, boolean isV2); }
OpenApiScannerSensor implements Sensor { @Override public void execute(SensorContext context) { FilePredicates p = context.fileSystem().predicates(); OpenApiProperties openApiProperties = new OpenApiProperties(); scanFiles(context, p, openApiProperties.getV2FilesPattern(context), true); scanFiles(context, p, openApiProperties.getV3FilesPattern(context), false); } OpenApiScannerSensor(CheckFactory checkFactory, FileLinesContextFactory fileLinesContextFactory, NoSonarFilter noSonarFilter);  OpenApiScannerSensor(CheckFactory checkFactory, FileLinesContextFactory fileLinesContextFactory, NoSonarFilter noSonarFilter, @Nullable OpenApiCustomRuleRepository[] customRuleRepositories); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext context); void scanFiles(SensorContext context, FilePredicates p, String[] pathPatterns, boolean isV2);  }