Skip to content

Commit

Permalink
Merge pull request #2098 from bjaglin/cli-old-versions
Browse files Browse the repository at this point in the history
explain when and how to run CLI with a given Scala version
  • Loading branch information
bjaglin authored Oct 4, 2024
2 parents 1bf297d + 124c190 commit 9c282a5
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/users/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -411,13 +411,27 @@ 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 files are not built with the latest minor version of Scala,
> use one of the following commands to create a custom runner
>
> ```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 9c282a5

Please sign in to comment.