a2i2 / mining-data-science-repositories

A large-scale comparative analysis of Coding Standard conformance in Open-Source Data Science projects
https://arxiv.org/abs/2007.08978
7 stars 5 forks source link

Exit status of Pylint subprocess not checked #16

Open anjsimmo opened 4 years ago

anjsimmo commented 4 years ago

task_analyse_pylint executes Pylint as a subprocess and checks stderr for errors. However, if Pylint fails in an unexpected way (e.g. the task is killed) the stderr may be empty, thus causing the script to incorrectly assume Pylint completed successfully.

We should check the process exit status as an additional safegaurd against the possibility of missing warnings (a threat to the internal validity of the study).

anjsimmo commented 4 years ago

Additional details: In some cases, Pylint is printing warnings to stderr that can be safely ignored. It would be much better to check the return code of Pylint rather than attempting to use stderr.