You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
man page: incorrect statement regarding use of - (read from stdin) and --filename flag #1079
If any EditorConfig files are found, they will be used to apply formatting options. If any parser or printer flags are given to the tool, no EditorConfig formatting options will be used. A default like -i=0 can be used for this purpose.
Here's the problem: The --filename flag, which is intended to help with finding EditorConfig files when reading from stdin is listed under Parser flags and thus (according to the statement above) should stop EditorConfig formatting options from being used.
Possible solutions:
Move the --filename flag to either the Generic or Utility flags section, or
add an explicit exception for the --filename flag to the statement quoted above.
Good point, and thank you for bringing it up. I agree with your first suggestion; even though the filename affects the parser, it also affects other parts of the tool such as the EditorConfig logic, so it can go under generic flags.
Activity
mvdan commentedon Oct 19, 2024
Good point, and thank you for bringing it up. I agree with your first suggestion; even though the filename affects the parser, it also affects other parts of the tool such as the EditorConfig logic, so it can go under generic flags.
cmd/shfmt: move --filename out of parser options
chore(deps): update module mvdan.cc/sh/v3/cmd/shfmt to v3.12.0 (hetzn…