florianschanda / miss_hit

MATLAB Independent, Small & Safe, High Integrity Tools - code formatter and more
GNU General Public License v3.0
170 stars 20 forks source link

GitHub actions does not work because CLI call always returns 0 #297

Open nspiller opened 2 months ago

nspiller commented 2 months ago

...MISS_HIT Component affected Please choose one from:

Your MATLAB/Octave environment

Your operating system and Python version

The github actions script supplied here successfully runs MISS HIT, but it is always successful, regardless of whether something has been found or not

Actual output:

$ mh_lint; echo $?
...
In some_funtion.m, line 2
| function f = other_function()
|              ^^^^^^^^^^^^^^ check (low): function name does not match the filename some_function [filename_primary_entity_name]
MISS_HIT Lint Summary: 39 file(s) analysed, 11 check(s)
0

Expected output:

$ mh_lint; echo $?
...
In some_funtion.m, line 2
| function f = other_function()
|              ^^^^^^^^^^^^^^ check (low): function name does not match the filename some_function [filename_primary_entity_name]
MISS_HIT Lint Summary: 39 file(s) analysed, 11 check(s)
1

Relevance: Return codes are necessary to use MISS HIT in automated CI such as GitHub actions.

florianschanda commented 2 months ago

This should be easy to do, and honestly I thought it would work like that already.