Issues

Issue #73 new

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 (6)

  1. holger krekel repo owner

    tox doesn't implement shell semantics (it wouldn't easily work on windows). Can you instruct pylint with an option to write the output somewhere?

  2. 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.

  3. 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.

  4. Log in to comment