Skip to content

no-duplicate-sections

all languagescorrectnessno fixdefault: warn

Reports a section that has the same name as an earlier section of the file (INI and EditorConfig: the section header, for EditorConfig the glob).

Readers of the format handle repeated sections in different ways: some merge them, some keep only the last, so the settings of one of them may be lost or applied in an order that is hard to see.

To fix, merge the two sections into one.

Reported
...
[*.vb]
indent_size = 2
[*.cs]
tab_width = 4
[*.CS]
tab_width = 4
lint:
rules:
no-duplicate-sections: warn # off, warn (default), error

Suppress one line with sudsy-disable-next-line no-duplicate-sections in a comment of the file’s language.