[code-quality] check for files with bad styles

Juan BC jbc.develop at gmail.com
Fri Dec 12 20:32:46 CET 2014


i actually writing a test case who check code style with flake8

i interested in retrieve only the name of the files with errors not the 
error itself, so after some research i trying to capture the stdout of 
flake8 and write the next code

out, err = sys.stdout, sys.stderr
dummy = StringIO()
sys.stdout, sys.stderr = dummy, dummy
pep8 = engine.get_style_guide()
pep8.paths = [....]
report = pep8.check_files()
sys.stdout, sys.stderr = out, err

Always dummy.getvalue() comes empty. Its another way to retrieve the 
list of files who fail the check?

also i try to write my own report class who inherit from BaseQReport and 
add redefining a error method with a multiprocessing.Queue for 
communication but don't work

Sorry for my poor english grammar

regards.


More information about the code-quality mailing list