@Test public void test_sonarcloud() { SonarRuntime sonarRuntime = SonarRuntimeImpl.forSonarQube(Version.create(8, 5), SonarQubeSide.SCANNER, SonarEdition.SONARCLOUD); List<String> warnings = new ArrayList<>(); NodeDeprecationWarning deprecationWarning = new NodeDeprecationWarning(sonarRuntime, warnings::add); deprecationWarning.logNodeDeprecation(8); assertThat(warnings).isEmpty(); assertThat(logTester.logs(LoggerLevel.WARN)).contains(MSG); }
void logNodeDeprecation(int actualNodeVersion) { if (actualNodeVersion < MIN_RECOMMENDED_NODE_VERSION) { String msg = String.format("You are using Node.js version %d, which reached end-of-life. " + "Support for this version will be dropped in future release, please upgrade Node.js to more recent version.", actualNodeVersion); LOG.warn(msg); if (isSonarQube() && analysisWarnings != null) { analysisWarnings.addUnique(msg); } } }
NodeDeprecationWarning { void logNodeDeprecation(int actualNodeVersion) { if (actualNodeVersion < MIN_RECOMMENDED_NODE_VERSION) { String msg = String.format("You are using Node.js version %d, which reached end-of-life. " + "Support for this version will be dropped in future release, please upgrade Node.js to more recent version.", actualNodeVersion); LOG.warn(msg); if (isSonarQube() && analysisWarnings != null) { analysisWarnings.addUnique(msg); } } } }
NodeDeprecationWarning { void logNodeDeprecation(int actualNodeVersion) { if (actualNodeVersion < MIN_RECOMMENDED_NODE_VERSION) { String msg = String.format("You are using Node.js version %d, which reached end-of-life. " + "Support for this version will be dropped in future release, please upgrade Node.js to more recent version.", actualNodeVersion); LOG.warn(msg); if (isSonarQube() && analysisWarnings != null) { analysisWarnings.addUnique(msg); } } } NodeDeprecationWarning(SonarRuntime sonarRuntime);  NodeDeprecationWarning(SonarRuntime sonarRuntime, @Nullable AnalysisWarnings analysisWarnings); }
NodeDeprecationWarning { void logNodeDeprecation(int actualNodeVersion) { if (actualNodeVersion < MIN_RECOMMENDED_NODE_VERSION) { String msg = String.format("You are using Node.js version %d, which reached end-of-life. " + "Support for this version will be dropped in future release, please upgrade Node.js to more recent version.", actualNodeVersion); LOG.warn(msg); if (isSonarQube() && analysisWarnings != null) { analysisWarnings.addUnique(msg); } } } NodeDeprecationWarning(SonarRuntime sonarRuntime);  NodeDeprecationWarning(SonarRuntime sonarRuntime, @Nullable AnalysisWarnings analysisWarnings);  }
NodeDeprecationWarning { void logNodeDeprecation(int actualNodeVersion) { if (actualNodeVersion < MIN_RECOMMENDED_NODE_VERSION) { String msg = String.format("You are using Node.js version %d, which reached end-of-life. " + "Support for this version will be dropped in future release, please upgrade Node.js to more recent version.", actualNodeVersion); LOG.warn(msg); if (isSonarQube() && analysisWarnings != null) { analysisWarnings.addUnique(msg); } } } NodeDeprecationWarning(SonarRuntime sonarRuntime);  NodeDeprecationWarning(SonarRuntime sonarRuntime, @Nullable AnalysisWarnings analysisWarnings);   }