]> source.dussan.org Git - sonarqube.git/blob
f92f857574dc295be1c9a76c3e15b8669eadb151
[sonarqube.git] /
1 /*
2  * SonarQube
3  * Copyright (C) 2009-2024 SonarSource SA
4  * mailto:info AT sonarsource DOT com
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 3 of the License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this program; if not, write to the Free Software Foundation,
18  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19  */
20 package org.sonar.ce.task.projectanalysis.batch;
21
22 import java.io.InputStream;
23 import java.util.Optional;
24 import javax.annotation.CheckForNull;
25 import org.sonar.core.util.CloseableIterator;
26 import org.sonar.scanner.protocol.output.ScannerReport;
27
28 public interface BatchReportReader {
29   ScannerReport.Metadata readMetadata();
30
31   @CheckForNull
32   InputStream getAnalysisCache();
33
34   CloseableIterator<String> readScannerLogs();
35
36   CloseableIterator<ScannerReport.ActiveRule> readActiveRules();
37
38   CloseableIterator<ScannerReport.AdHocRule> readAdHocRules();
39
40   CloseableIterator<ScannerReport.Measure> readComponentMeasures(int componentRef);
41
42   @CheckForNull
43   ScannerReport.Changesets readChangesets(int componentRef);
44
45   ScannerReport.Component readComponent(int componentRef);
46
47   CloseableIterator<ScannerReport.Issue> readComponentIssues(int componentRef);
48
49   CloseableIterator<ScannerReport.ExternalIssue> readComponentExternalIssues(int componentRef);
50
51   CloseableIterator<ScannerReport.Duplication> readComponentDuplications(int componentRef);
52
53   CloseableIterator<ScannerReport.CpdTextBlock> readCpdTextBlocks(int componentRef);
54
55   CloseableIterator<ScannerReport.Symbol> readComponentSymbols(int componentRef);
56
57   CloseableIterator<ScannerReport.SyntaxHighlightingRule> readComponentSyntaxHighlighting(int fileRef);
58
59   CloseableIterator<ScannerReport.LineCoverage> readComponentCoverage(int fileRef);
60
61   /**
62    * Reads a file's source code, line by line. Returns an absent optional if the file does not exist
63    */
64   Optional<CloseableIterator<String>> readFileSource(int fileRef);
65
66   CloseableIterator<ScannerReport.ContextProperty> readContextProperties();
67
68   Optional<CloseableIterator<ScannerReport.LineSgnificantCode>> readComponentSignificantCode(int fileRef);
69
70   Optional<ScannerReport.ChangedLines> readComponentChangedLines(int fileRef);
71
72   CloseableIterator<ScannerReport.AnalysisWarning> readAnalysisWarnings();
73 }