Skip to content

root-in-section

INI / EditorConfig / .gitignorecorrectnessno fixdefault: warn

Reports a root property inside a section. root stops the search for parent .editorconfig files only as a pair before the first [section]; inside a section editors ignore it. No fix: moving it into the preamble is the author’s call.

The author meant to stop the search at this file, but it does nothing, so settings of the parent directories keep applying, and the files are formatted differently from what the file says.

To fix, put root = true above the first section.

Reported
...
[*.cs]
indent_size = 4
Root = true
[*.vb]
...
editorconfig:
lint:
rules:
root-in-section: warn # off, warn (default), error

Suppress one line with sudsy-disable-next-line root-in-section in a comment of the file’s language.