Skip to content

Commit 0dbebb8

Browse files
docs: document multi-value CLI usage
1 parent a3e58bc commit 0dbebb8

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/users/installation.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,23 @@ cs launch scalafix:0.13.0 -- --version # Should say 0.13.0
443443
444444
```
445445
446+
### Multiple values for CLI flags
447+
448+
Some Scalafix CLI flags accept more than one value (for example `--rules`,
449+
`--files`, or compiler options). Pass each value by repeating the flag instead
450+
of trying to comma-separate or space-separate them. For instance, when you need
451+
to forward several scalac options you would write:
452+
453+
```
454+
scalafix \
455+
--rules RemoveUnused \
456+
--scalac-options -Wunused:imports \
457+
--scalac-options -Wvalue-discard
458+
```
459+
460+
The CLI treats those repeated occurrences as a list, so both compiler options
461+
are forwarded to each Scalafix invocation.
462+
446463
## Support in other build tools
447464

448465
Scalafix is supported in other build tools via externally maintained plugins:

0 commit comments

Comments
 (0)