Skip to content

pylint process return code is ignored #58

@aleb

Description

@aleb

As seen below, when the pylint process fails, git-pylint-commit-hook reports a score of 0/10.00. Would be useful to forward pylint's stderr when this happens, to be able to debug.

$ git commit -a -m x
Running pylint on pitivi/shortcuts.py (file 1/1)..	0/10.00	FAILED
$ pylint --rcfile=docs/pylint.rc pitivi/shortcuts.py || echo 1
Using config file /home/aleb/dev/ptv-stable/pitivi/docs/pylint.rc
Traceback (most recent call last):
  File "/home/aleb/dev/ptv-stable/pitivi/build/flatpak/pyvenv/bin/pylint", line 11, in <module>
    sys.exit(run_pylint())
  File "/home/aleb/dev/ptv-stable/pitivi/build/flatpak/pyvenv/lib/python3.6/site-packages/pylint/__init__.py", line 16, in run_pylint
    Run(sys.argv[1:])
  File "/home/aleb/dev/ptv-stable/pitivi/build/flatpak/pyvenv/lib/python3.6/site-packages/pylint/lint.py", line 1307, in __init__
    'init-hook')))
  File "/home/aleb/dev/ptv-stable/pitivi/build/flatpak/pyvenv/lib/python3.6/site-packages/pylint/lint.py", line 1408, in cb_init_hook
    exec(value) # pylint: disable=exec-used
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'gi'
1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions