Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explain when and how to run CLI with a given Scala version #2098

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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