fedora-copr / vcs-diff-lint

VCS Differential Code Analysis Tool
GNU General Public License v2.0
4 stars 2 forks source link

Fail if the vcs-diff-lint crashes #36

Open praiskup opened 1 month ago

praiskup commented 1 month ago

I noticed in https://github.com/rpm-software-management/tito/actions/runs/11158295140/job/31014265915?pr=504 that the action reported "success" even though no lining has been done by pylint:

 Traceback (most recent call last):
  File "/usr/bin/vcs-diff-lint-csdiff-pylint", line 47, in <module>
    sys.exit(_main())
             ^^^^^^^
  File "/usr/bin/vcs-diff-lint-csdiff-pylint", line 23, in _main
    data = json.loads(pylint_result.stdout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

The problem was an unreadable pylintrc file.