miss_hit icon indicating copy to clipboard operation
miss_hit copied to clipboard

Automatic fixing ignores justifications

Open pvogt09 opened this issue 10 months ago • 2 comments

MISS_HIT Component affected Please choose one from:

  • Style checker

Your MATLAB/Octave environment

  • MATLAB
  • R2023B

Your operating system and Python version

  • Linux
  • python 3.8.10

Describe the bug Running the style checker with the autofix option and default configuration on

% symblic derivation
xdot % mh:ignore_style
y % mh:ignore_style
dzdx = jacobian(xdot, x) % mh:ignore_style
dzdu = jacobian(xdot, u) % mh:ignore_style
dzdmv = jacobian(xdot, u(1)) % mh:ignore_style
dydx = jacobian(y, x) % mh:ignore_style

fixes this file to

% symblic derivation
xdot; % mh:ignore_style
y; % mh:ignore_style
dzdx = jacobian(xdot, x); % mh:ignore_style
dzdu = jacobian(xdot, u); % mh:ignore_style
dzdmv = jacobian(xdot, u(1)); % mh:ignore_style
dydx = jacobian(y, x); % mh:ignore_style

by adding a semicolon to every line that was supposed to be ignored. The style checker without autofix option does not complain about the missing semicola though.

pvogt09 avatar Apr 11 '24 15:04 pvogt09

I have to admit, I did not consider this use-case.

florianschanda avatar Jul 08 '24 13:07 florianschanda

I looked into this and the mechanism to do that would require a rewrite in how justifications are done. Tagging it high complexity for now

florianschanda avatar Aug 15 '24 11:08 florianschanda