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
For example, a pre-commit script may always run `rs fmt`, even when the staged changes contain no supported files. This option lets the command exit successfully in that case instead of blocking the commit.
109
109
110
+
> [`rs staged`](./staged) enables this behavior automatically for its `rs fmt` tasks.
111
+
110
112
### `--parallel-workers <count>`
111
113
112
114
Set the maximum number of formatting workers to a positive integer:
Copy file name to clipboardExpand all lines: website/docs/en/guide/cli/staged.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,3 +100,5 @@ define.staged({
100
100
'*.{json,md,mdx,css,html}': 'rs fmt',
101
101
});
102
102
```
103
+
104
+
When `rs staged` runs an `rs fmt` task, the formatter exits successfully if none of the provided paths match or if all matching files are ignored. Direct `rs fmt` commands remain strict; use [`--no-error-on-unmatched-pattern`](./fmt#--no-error-on-unmatched-pattern) to enable the same behavior in other integrations.
0 commit comments