Skip to content
This repository was archived by the owner on May 23, 2025. It is now read-only.

Commit 44150d1

Browse files
committed
remove the pylint functionnality before implementing it back
1 parent 71bcbc5 commit 44150d1

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed

src/main/resources/static/analysis.js

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

src/main/resources/strings.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ property.definition.pylintrc.key=sonar.pylintrc.path
183183
property.definition.pylintrc.api.key=pylintrc
184184
property.definition.pylintrc.name=Pylintrc
185185
property.definition.pylintrc.desc=Absolute path of CNES Pylint extension's folder containing pylintrc file.
186-
property.definition.pylintrc.default=/opt/python/cnes-pylint-extension-1.0/
186+
property.definition.pylintrc.default=/opt/python/
187187

188188
# Request to get the list of quality gates
189189
cnes.requests.qualitygates.list=api/qualitygates/list

0 commit comments

Comments
 (0)