-
Notifications
You must be signed in to change notification settings - Fork 136
Commit 15729f3
fix!: options in .editorconfig not work with shfmt
Must pass --filename option to shfmt.
When shfmt read content from stdin, it doesn't know the filename and its extension.
So it won't match the patterns "[*.sh]" and "[*.bash]" in .editorconfig.
Do not pass any Parser and Printer options like -i/-p/-bn/-l. It will cause the .editorconfig not to be loaded.
See https://github.com/mvdan/sh/blob/23633a432f903599a4ce46c30c4337e413a26ef1/cmd/shfmt/main.go#L186-L196
Breaking Change:
Removed shfmtConfig options. Use the .editorconfig options instead of.
The .editorconfig options of shfmt refer to https://github.com/mvdan/sh/blob/master/cmd/shfmt/shfmt.1.scd#examples 1 parent 84dccb5 commit 15729f3
1 file changed
+13
-10
lines changedLines changed: 13 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | 3 |
| |
4 | + | ||
4 | 5 |
| |
5 | 6 |
| |
6 | 7 |
| |
| |||
41 | 42 |
| |
42 | 43 |
| |
43 | 44 |
| |
44 | - | ||
45 | - | ||
46 | - | ||
45 | + | ||
47 | 46 |
| |
48 | 47 |
| |
49 | 48 |
| |
| |||
61 | 60 |
| |
62 | 61 |
| |
63 | 62 |
| |
64 | - | ||
63 | + | ||
65 | 64 |
| |
66 | 65 |
| |
67 | 66 |
| |
68 | - | ||
69 | - | ||
70 | - | ||
71 | - | ||
72 | - | ||
73 | - | ||
67 | + | ||
68 | + | ||
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | ||
76 | + | ||
74 | 77 |
| |
75 | 78 |
| |
76 | 79 |
| |
|
0 commit comments