miss_hit icon indicating copy to clipboard operation
miss_hit copied to clipboard

mh_lint: make sure enum coverage is complete

Open niklasnylen opened this issue 5 years ago • 1 comments

switch/case statements must have a default case (otherwise) if needed

Motivation: If the case is selected based on an enumerated value and not all enum members are handled, either explicitly or by a default case, compilation of code generated with Matlab Coder will often result in compiler warnings (e.g. enumeration constant X not handled in switch).

Requires: #149

niklasnylen avatar Feb 25 '20 14:02 niklasnylen

Making this a style rule is not helpful I think. However in the upcoming linter we'll know if the enum coverage is complete or not; and we can warn about useless otherwise and missing cases in that case.

florianschanda avatar Feb 26 '20 08:02 florianschanda