Skip to content

Automatic indentation not indenting enough #289

@pvogt09

Description

@pvogt09

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug: minorSomething isn't workingtool: mh_styleAffects the style checker tool

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions