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

duplicate rules in the miss_hit config seem to be allowed #242

Open Remi-Gau opened 2 years ago

Remi-Gau commented 2 years ago

MISS_HIT Component affected

Your MATLAB/Octave environment

Describe the bug

By chance I ended up having this in my config and it did not throw a warning or an error. I am not sure what should be the intended behavior, there.

regex_function_name: "[a-zA-Z0-9]+(_[a-zA-Z0-9]+)*"
regex_function_name: "[a-z]+(_[a-z]+)*"
florianschanda commented 2 years ago

This is by design, since you can overwrite config items with config files further down the directory tree.

That said, I will implement a warning here since there is no real use case that I can think of to have something specified twice in the same file.

Remi-Gau commented 2 years ago

This is by design, since you can overwrite config items with config files further down the directory tree.

Ah yes I see. Thanks for the clarification. :grin: