I some 300,000 snippets of code, submitted by 700 students, which I have imported into a pandas data frame.
My goal is to run static analysis on all of these codes to find out what sort of errors they are facing. And I'm trying to do it without having to write these to actual files (300k files).
things I have tried :
directly calling pylint on data frame item
pl.run_pylint(['--errors-only',dt.iloc[0][0]])
and output is
************* Module number = int(input('Please enter a number: '));
if number < 0 {
print(number*-1);
} else {
print(number);
}
number = int(input('Please enter a number: '));
if number < 0 {
print(number*-1);
} else {
print(number);
}:1:0: F0001: No module named number = int(input('Please enter a number: '));
if number < 0 {
print(number*-1);
} else {
print(number);
} (fatal)
An exception has occurred, use %tb to see the full traceback.
SystemExit: 1
whereas if I output the dataFrame content to a file, and run
pl.run_pylint(['--errors-only','test.py'])
the output is
************* Module test
test.py:1:15: E0001: invalid syntax (<unknown>, line 1) (syntax-error)
An exception has occurred, use %tb to see the full traceback.
SystemExit: 2
I'm actually out of ideas. Any help is greatly appreciated!!