Introduce SonarCloud integration and resolve assorted violations (#575)

This commit is contained in:
Stephan Schroevers
2023-04-25 08:19:11 +02:00
committed by GitHub
parent 554a3e634c
commit e0c795d248
142 changed files with 450 additions and 211 deletions

View File

@@ -25,6 +25,7 @@ enum ExtractorType {
return identifier;
}
@SuppressWarnings("java:S1452" /* The extractor returns data of an unspecified type. */)
Extractor<?> getExtractor() {
return extractor;
}

View File

@@ -67,10 +67,11 @@ final class DocumentationGeneratorTaskListenerTest {
@Test
void excessArguments(@TempDir Path outputDirectory) {
String actualOutputDirectory = outputDirectory.toAbsolutePath() + " extra-arg";
assertThatThrownBy(
() ->
Compilation.compileWithDocumentationGenerator(
outputDirectory.toAbsolutePath() + " extra-arg", "A.java", "package pkg;"))
actualOutputDirectory, "A.java", "package pkg;"))
.isInstanceOf(IllegalArgumentException.class)
.hasMessage("Precisely one path must be provided");
}