Skip to content

Commit

Permalink
cmd/shfmt: document how EditorConfig's "ignore" works
Browse files Browse the repository at this point in the history
In particular, that it only applies when formatting directories.
When directly formatting files, we don't ignore anything.

For #1037.
  • Loading branch information
mvdan committed Oct 13, 2023
1 parent 9477b02 commit 9e7ba14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/shfmt/shfmt.1.scd
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ keep_padding = true
# --func-next-line
function_next_line = true
# Ignore the entire "third_party" directory.
# Ignore the entire "third_party" directory when formatting directories,
# such as "shfmt -l -w .".
# When formatting regular files explicitly, like "shfmt -w third_party/foo.sh",
# the files are always formatted regardless of this setting.
[third_party/**]
ignore = true
```
Expand Down

0 comments on commit 9e7ba14

Please sign in to comment.