Skip to content

inline-comment

INI / EditorConfig / .gitignorecorrectnessno fixdefault: warn

Reports a pattern line with a # after the pattern. Files of this syntax have no end-of-line comments: *.log # logs is a pattern for a file name with spaces and a #, which matches nothing. No fix.

The line looks like a pattern with a comment, but the whole text is the pattern, so the files the author wants to ignore are not ignored.

To fix, put the comment on a line of its own above the pattern.

Reported
*.log # logs
# a # b
name#x
dist/
gitignore:
lint:
rules:
inline-comment: warn # off, warn (default), error

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