Skip to content

Commit 831c146

Browse files
authored
Merge pull request #2322 from arnavsharma990/970-docs-multi-value
docs: document how to pass multiple values for CLI flags (e.g. --scalac-options)
2 parents a3e58bc + 0dbebb8 commit 831c146

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)