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

Automatic indentation not indenting enough #289

Open pvogt09 opened 3 months ago

pvogt09 commented 3 months ago

MISS_HIT Component affected Please choose one from:

Your MATLAB/Octave environment

Your operating system and Python version

Describe the bug When using the configuration

tab_width: 4
# do not align matrices on opening brackets
align_round_brackets: false
align_other_brackets: false

on the file

var1 = {
    1
    2
};

var2 = [
    1
    2
];

var3 = fun( ...
    1, ...
    2.0 ...
);

with the autofix option, this results in

var1 = {
    1
    2
  };

var2 = [
    1
    2
  ];

var3 = fun( ...
    1, ...
    2.0 ...
  );

where the closing brackets are indented two spaces to few since the indentation level was set to four. This can happen at different nesting levels of functions, methods, classes and cells/matrices. It might be related to #284.