Skip to content

Commit

Permalink
explain when and how to run CLI with a given Scala version
Browse files Browse the repository at this point in the history
  • Loading branch information
bjaglin committed Oct 4, 2024
1 parent 77f46da commit 9dbf7aa
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion docs/users/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,28 @@ git diff // should produce a diff
First, install the [Coursier](https://get-coursier.io/docs/cli-installation)
command-line interface.

Next, install a `scalafix` binary with Coursier
Then, download the Scalafix runner built with the latest version of Scala
(@SCALA3NEXT@)

```sh
cs install scalafix
./scalafix --version # Should say @VERSION@
```

> If you plan to use advanced semantic rules like `ExplicitResultTypes`, you
> must use the version of Scalafix built with a Scala version matching your
> target source files.
>
> If your target file are not built with the latest minor version of Scala,
> use one of the following commands to create a custom runner for the most
> appropriate version
>
> ```sh
> cs bootstrap ch.epfl.scala:scalafix-cli_@SCALA212@:@VERSION@ --main scalafix.cli.Cli -o scalafix_2.12
> cs bootstrap ch.epfl.scala:scalafix-cli_@SCALA213@:@VERSION@ --main scalafix.cli.Cli -o scalafix_2.13
> cs bootstrap ch.epfl.scala:scalafix-cli_@SCALA3LTS@:@VERSION@ --main scalafix.cli.Cli -o scalafix_3-lts
> ```
### Help
```scala mdoc:--help
Expand Down

0 comments on commit 9dbf7aa

Please sign in to comment.