I can't seem to get any return value when running pylint from Python code directly. Running it from the command line generates a nice report, with a summarized score at the bottom.
I've tried putting the return value of "Run" into a variable, and getting it's "reports" field - but it looks like some default template.
this is what I have:
from io import StringIO
from pylint.reporters import text
from pylint.lint import Run
def main():
print("I will verify you build!")
pylint_opts = ['--rcfile=pylintrc.txt', '--reports=n', 'utilities']
pylint_output = StringIO()
reporter = text.TextReporter(pylint_output)
Run(pylint_opts, reporter=reporter, do_exit=False)
print(pylint_output.read())
if __name__ == '__main__':
main()
I'd expect some report here, but all I get is: " I will verify you build!
Process finished with exit code 0 "