miss_hit icon indicating copy to clipboard operation
miss_hit copied to clipboard

Automatic indentation not indenting enough

Open pvogt09 opened this issue 10 months ago • 0 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 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.

pvogt09 avatar Apr 11 '24 15:04 pvogt09