Skip to content

Commit

Permalink
Remove Sonar Integration (hyperledger#4135)
Browse files Browse the repository at this point in the history
Sonar has been removed from the build workflow. This PR removes all
configuration and code markings that were used to facilitate it.

Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
  • Loading branch information
shemnon authored Jul 21, 2022
1 parent 1dd7357 commit d0c71c3
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 66 deletions.
9 changes: 1 addition & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,6 @@ jobs:
command: |
./gradlew --no-daemon build
- capture_test_results
# Temporarily disabled
# - run:
# name: SonarQube
# no_output_timeout: 30m
# command: ./gradlew --no-daemon jacocoRootReport sonarqube -Dsonar.login=$SONAR_TOKEN

integrationTests:
executor: xl_machine_executor
Expand Down Expand Up @@ -411,9 +406,7 @@ workflows:
- dco
- spotless
- unitTests:
# Temporarily disabled
# context: SonarCloud
requires:
requires:
- assemble
- testWindows:
requires:
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/sonarcloud.yml

This file was deleted.

6 changes: 3 additions & 3 deletions besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ static class TxPoolOptionGroup {
"Maximum number of pending transaction hashes that will be kept in the transaction pool (default: ${DEFAULT-VALUE})",
arity = "1")
@SuppressWarnings("unused")
private final Integer pooledTransactionHashesSize = null; // NOSONAR
private final Integer pooledTransactionHashesSize = null;

@Option(
names = {"--tx-pool-retention-hours"},
Expand Down Expand Up @@ -1906,7 +1906,7 @@ private void issueOptionWarnings() {
"--privacy-flexible-groups-enabled");
}

if (txPoolOptionGroup.pooledTransactionHashesSize != null) { // NOSONAR
if (txPoolOptionGroup.pooledTransactionHashesSize != null) {
logger.warn(DEPRECATED_AND_USELESS_WARNING_MSG, "--tx-pool-hashes-max-size");
}
}
Expand Down Expand Up @@ -2136,7 +2136,7 @@ private JsonRpcConfiguration createEngineJsonRpcConfiguration(
engineConfig.setAuthenticationEnabled(true);
engineConfig.setAuthenticationAlgorithm(JwtAlgorithm.HS256);
if (Objects.nonNull(engineRPCOptionGroup.engineJwtKeyFile)
&& java.nio.file.Files.exists(engineRPCOptionGroup.engineJwtKeyFile)) { // NOSONAR
&& java.nio.file.Files.exists(engineRPCOptionGroup.engineJwtKeyFile)) {
engineConfig.setAuthenticationPublicKeyFile(engineRPCOptionGroup.engineJwtKeyFile.toFile());
} else {
logger.info(
Expand Down
13 changes: 0 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,8 @@ plugins {
id 'me.champeau.jmh' version '0.6.6' apply false
id 'net.ltgt.errorprone' version '2.0.2'
id 'maven-publish'
id 'org.sonarqube' version '3.4.0.2513'
}

sonarqube {
properties {
property "sonar.projectKey", "hyperledger_besu"
property "sonar.organization", "hyperledger"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.coverage.jacoco.xmlReportPaths", "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
property "sonar.coverage.exclusions", "acceptance-tests/**/*"
}
}

project.tasks["sonarqube"].dependsOn "jacocoRootReport"

if (!JavaVersion.current().java11Compatible) {
throw new GradleException("Java 11 or later is required to build Besu.\n" +
" Detected version ${JavaVersion.current()}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
*/
public class Slf4jLambdaHelper {

// sonar code smell
private Slf4jLambdaHelper() {}

public static void warnLambda(
Expand Down

0 comments on commit d0c71c3

Please sign in to comment.