59
59
import org .sonarqube .ws .client .setting .ResetRequest ;
60
60
import org .sonarqube .ws .client .setting .SetRequest ;
61
61
import org .sonarsource .sonarlint .core .ConnectedSonarLintEngineImpl ;
62
+ import org .sonarsource .sonarlint .core .NodeJsHelper ;
62
63
import org .sonarsource .sonarlint .core .WsHelperImpl ;
63
64
import org .sonarsource .sonarlint .core .client .api .common .Language ;
64
65
import org .sonarsource .sonarlint .core .client .api .common .analysis .AnalysisResults ;
@@ -203,6 +204,10 @@ public void start() {
203
204
Map <String , String > globalProps = new HashMap <>();
204
205
globalProps .put ("sonar.global.label" , "It works" );
205
206
logs = new ArrayList <>();
207
+
208
+ NodeJsHelper nodeJsHelper = new NodeJsHelper ();
209
+ nodeJsHelper .detect (null );
210
+
206
211
engine = new ConnectedSonarLintEngineImpl (ConnectedGlobalConfiguration .builder ()
207
212
.setServerId ("sonarcloud" )
208
213
.setSonarLintUserHome (sonarUserHome )
@@ -217,8 +222,8 @@ public void start() {
217
222
.addEnabledLanguage (Language .XML )
218
223
.setLogOutput ((msg , level ) -> {
219
224
logs .add (msg );
220
- System .out .println (msg );
221
225
})
226
+ .setNodeJs (nodeJsHelper .getNodeJsPath (), nodeJsHelper .getNodeJsVersion ())
222
227
.setExtraProperties (globalProps )
223
228
.build ());
224
229
assertThat (engine .getGlobalStorageStatus ()).isNull ();
0 commit comments