-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/shfmt: add --apply-ignore flag for tools and editors
The EditorConfig ignore=true property is currently only obeyed when walking directories, which is fine for command line users running shfmt like shfmt -l -w . However, many tools and editor integrations use shfmt via stdin or by passing a single file argument, and in those cases, the ignore=true logic does not kick in at all. There should be a way for a user to force running shfmt on a file, and that has always been passing a file as a direct argument, like: shfmt -w file.sh We can't break that, but tools do need a way to obey ignore rules. For that reason, add an --apply-ignore flag which does just that. Fixes #1037.
- Loading branch information
Showing
3 changed files
with
94 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters