Skip to content

backslash-separator

INI / EditorConfig / .gitignorecorrectnessno fixdefault: warn

Reports a pattern with a backslash before a letter, digit, _ or - (build\out), which is the pattern buildout. \. and \# are ordinary escapes and are not reported. No fix.

In a pattern file \ escapes the next character, it does not separate paths as on Windows, so the pattern matches something other than the path the author wrote, and the files stay in version control or in the build context.

To fix, write /.

Reported
build\out
\#file
foo\.bar
gitignore:
lint:
rules:
backslash-separator: warn # off, warn (default), error

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