-
Notifications
You must be signed in to change notification settings - Fork 137
Commit 86e7671
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 04a2cb3 commit 86e7671
1 file changed
+16
-10
lines changedLines changed: 16 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
1 | 4 |
| |
2 | 5 |
| |
3 | 6 |
| |
| |||
41 | 44 |
| |
42 | 45 |
| |
43 | 46 |
| |
44 | - | ||
45 | - | ||
46 | - | ||
47 | + | ||
47 | 48 |
| |
48 | 49 |
| |
49 | 50 |
| |
| |||
61 | 62 |
| |
62 | 63 |
| |
63 | 64 |
| |
64 | - | ||
65 | + | ||
65 | 66 |
| |
66 | 67 |
| |
67 | 68 |
| |
68 | - | ||
69 | - | ||
70 | - | ||
71 | - | ||
72 | - | ||
73 | - | ||
69 | + | ||
70 | + | ||
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | ||
76 | + | ||
77 | + | ||
78 | + | ||
79 | + | ||
74 | 80 |
| |
75 | 81 |
| |
76 | 82 |
| |
|
0 commit comments