florianschanda / miss_hit

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

mh_style 'hangs' when there are dits in the function name #276

Closed Remi-Gau closed 11 months ago

Remi-Gau commented 11 months ago

MISS_HIT Component affected Please choose one from:

Your MATLAB/Octave environment

Your operating system and Python version

Describe the bug

Discovered by mistake. Reduced the file to its simplest form to reproduce the bug.

Here is the content: clearly this is not valid matlab / octave and other miss_hit command have not problem parsing it but mh_style does not seem to like it.

$ cat pathToPrint.m 
function pth = foo.bar()

end
$ mh_style pathToPrint.m

Exception in thread Thread-3 (_handle_results):
Traceback (most recent call last):
  File "/home/remi/miniconda3/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/home/remi/miniconda3/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/home/remi/miniconda3/lib/python3.11/multiprocessing/pool.py", line 579, in _handle_results
    task = get()
           ^^^^^
  File "/home/remi/miniconda3/lib/python3.11/multiprocessing/connection.py", line 250, in recv
    return _ForkingPickler.loads(buf.getbuffer())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: ICE.__init__() missing 1 required positional argument: 'reason'
florianschanda commented 11 months ago

OK, there are two bugs here:

Thanks for this find. These are very rare :)