@@ -233,32 +233,33 @@ function registerScan(options, token) {
233233 // complete the spp with sources repository
234234 spp = spp . concat ( "\nsonar.sources=" + sources ) ;
235235
236+ //This part is not usefull anymore, since we need to implement the pylint analysis
236237 // if a python quality profile is set and there are no pylintrc set
237- for ( let i = 0 ; i < qualityprofiles . length ; i ++ ) {
238- const qualityprofile = JSON . parse ( qualityprofiles [ i ] ) ;
239- if ( qualityprofile [ 0 ] . toLowerCase ( ) == "py" && spp . indexOf ( "sonar.python.pylint.reportPaths" ) === - 1 ) {
240- // sonar pylint configuration property
241- let pylintrcSonar = "\nsonar.python.pylint.reportPaths=" ;
242- // name of the configuration file to use
243- let filename = "pylintrc_RNC2015_D" ;
244- // we append the appropriate one
245- // check if there is a rated A or B profile and add the corresponding file
246- if ( qualityprofile [ 1 ] == "RNC A" || qualityprofile [ 1 ] == "RNC B" ) {
247- filename = "pylintrc_RNC2015_A_B" ;
248- spp = spp . concat ( pylintrcSonar + pylintrcfolder + filename ) ;
249- info ( "Use of configuration file " + filename + " for Pylint." ) ;
250- // check if there is a rated C profile and add the corresponding file
251- } else if ( qualityprofile [ 1 ] == "RNC C" ) {
252- filename = "pylintrc_RNC2015_C" ;
253- spp = spp . concat ( pylintrcSonar + pylintrcfolder + filename ) ;
254- info ( "Use of configuration file " + filename + " for Pylint." ) ;
255- // otherwise it is a D configuration to use
256- } else {
257- spp = spp . concat ( pylintrcSonar + pylintrcfolder + filename ) ;
258- info ( "Use of configuration file " + filename + " for Pylint." ) ;
259- }
260- }
261- }
238+ // for (const element of qualityprofiles) {
239+ // const qualityprofile = JSON.parse(element );
240+ // if (qualityprofile[0].toLowerCase() == "py" && spp.indexOf("sonar.python.pylint.reportPaths") === -1) {
241+ // // sonar pylint configuration property
242+ // let pylintrcSonar = "\nsonar.python.pylint.reportPaths=";
243+ // // name of the configuration file to use
244+ // let filename = "pylintrc_RNC2015_D";
245+ // // we append the appropriate one
246+ // // check if there is a rated A or B profile and add the corresponding file
247+ // if (qualityprofile[1] == "RNC A" || qualityprofile[1] == "RNC B") {
248+ // filename = "pylintrc_RNC2015_A_B";
249+ // spp = spp.concat(pylintrcSonar + pylintrcfolder + filename);
250+ // info("Use of configuration file " + filename + " for Pylint.");
251+ // // check if there is a rated C profile and add the corresponding file
252+ // } else if (qualityprofile[1] == "RNC C") {
253+ // filename = "pylintrc_RNC2015_C";
254+ // spp = spp.concat(pylintrcSonar + pylintrcfolder + filename);
255+ // info("Use of configuration file " + filename + " for Pylint.");
256+ // // otherwise it is a D configuration to use
257+ // } else {
258+ // spp = spp.concat(pylintrcSonar + pylintrcfolder + filename);
259+ // info("Use of configuration file " + filename + " for Pylint.");
260+ // }
261+ // }
262+ // }
262263
263264
264265 return spp ;
0 commit comments