Issue #73 on hold

pipe output of command into file

Markus Hubig
created an issue

Hi together,

I need to pipe the output of pylint into a file, so the Jenkins violations plugin can check it later, but unfortunately:

commands = 
    pylint --rcfile=.pylintrc implib2 |tee pylint.out

gives me this error:

|tee:1: [F] No module named |tee

and

commands = 
    pylint --rcfile=.pylintrc implib2 > pylint.out

gives me this error:

>:1: [F] No module named >

For now I put the pylint command into the (bash) build command of jenkins, but it would be nice if I could put this into my tox.ini file.

Cheers, Markus

Comments (12)

  1. Markus Hubig reporter

    Yes I can, but unfortunately it seems the only way to instruct pylint to write something into a file, is via the "files-output" option, but this results in a couple of files. Luckily the jenkins violations plugin can also handle this situation, by specifying a search wildcard like this: **/pylint_**.txt

    But nevertheless I think it would be a nice feature to generally be able to collect the output of a command into a file.

  2. Rob van der Linde

    flake8 have since added the --output-file option which has saved me in the end, but would it really be that hard to add support for a small amount of pipe characters (> and |, maybe >>)... Windows supports these too.

  3. Log in to comment