diff --git a/docs/developers/symbol-information.html b/docs/developers/symbol-information.html index 9fd509edb..903fe9a81 100644 --- a/docs/developers/symbol-information.html +++ b/docs/developers/symbol-information.html @@ -334,42 +334,42 @@

Symbol("scala/Some#")).take(5) // res29: Set[SymbolInformation] = HashSet( -// scala/Option#get(). => abstract method get: A, -// scala/AnyRef#eq(). => final method eq(that: AnyRef): Boolean, -// scala/Any#isInstanceOf(). => final method isInstanceOf[A](): Boolean, -// scala/Any#getClass(). => final method getClass(): Class, -// scala/Option#zip(). => final method zip[A1 >: A, B](that: Option[B]): Option[Tuple2[A1, B]] +// scala/Option#filterNot(). => @inline final method filterNot(p: Function1[A, Boolean]): Option[A], +// scala/Product#productArity(). => abstract method productArity: Int, +// scala/Any#`##`(). => final method ##(): Int, +// scala/Some#copy$default$1(). => method copy$default$1[A]: A @<?>, +// scala/Any#`!=`(). => final method !=(that: Any): Boolean // ) getClassMethods(Symbol("java/lang/String#")).take(5) // res30: Set[SymbolInformation] = HashSet( -// java/lang/String#isLatin1(). => private method isLatin1(): Boolean, -// java/lang/String#charAt(). => method charAt(param0: Int): Char, -// java/lang/String#endsWith(). => method endsWith(param0: String): Boolean, -// java/lang/Object#finalize(). => protected method finalize(): Unit, -// java/lang/String#hashCode(). => method hashCode(): Int +// java/lang/String#concat(). => method concat(param0: String): String, +// java/lang/Object#registerNatives(). => private static method registerNatives(): Unit, +// java/lang/String#startsWith(+1). => method startsWith(param0: String): Boolean, +// java/lang/Object#equals(). => method equals(param0: Object): Boolean, +// java/lang/Object#registerNatives(). => private static method registerNatives(): Unit // ) getClassMethods(Symbol("scala/collection/immutable/List#")).take(5) // res31: Set[SymbolInformation] = HashSet( -// scala/collection/IterableOps#tail(). => method tail: C, -// scala/collection/IterableOps#coll(). => protected abstract method coll: C, -// scala/collection/IterableOnceOps#fold(). => method fold[A1 >: A](z: A1)(op: Function2[A1, A1, A1]): A1, -// scala/Any#`!=`(). => final method !=(that: Any): Boolean, -// scala/collection/IterableOps#scanRight(). => method scanRight[B](z: B)(op: Function2[A, B, B]): CC[B] +// scala/collection/SeqOps#indexOf(+1). => @deprecatedOverriding method indexOf[B >: A](elem: B): Int, +// scala/Any#`##`(). => final method ##(): Int, +// scala/collection/IterableOps#flatten(). => method flatten[B](implicit asIterable: Function1[A, IterableOnce[B]]): CC[B], +// scala/collection/IterableOps#flatten(). => method flatten[B](implicit asIterable: Function1[A, IterableOnce[B]]): CC[B], +// scala/collection/SeqOps#contains(). => method contains[A1 >: A](elem: A1): Boolean // )

For Java methods, use SymbolInformation.isStatic to separate static methods from non-static methods.

getClassMethods(Symbol("java/lang/String#")).filter(_.isStatic).take(3)
 // res32: Set[SymbolInformation] = HashSet(
-//   java/lang/String#valueOf(+8). => static method valueOf(param0: Double): String,
-//   java/lang/CharSequence#compare(). => static method compare(param0: CharSequence, param1: CharSequence): Int,
+//   java/lang/String#join(+1). => static method join(param0: CharSequence, param1: Iterable[local_wildcard]): String,
+//   java/lang/String#checkBoundsBeginEnd(). => private[lang] static method checkBoundsBeginEnd(param0: Int, param1: Int, param2: Int): Unit,
 //   java/lang/Object#registerNatives(). => private static method registerNatives(): Unit
 // )
 getClassMethods(Symbol("java/lang/String#")).filter(!_.isStatic).take(3)
 // res33: Set[SymbolInformation] = HashSet(
-//   java/lang/Object#wait(+1). => final method wait(param0: Long): Unit,
-//   java/lang/Object#toString(). => method toString(): String,
-//   java/lang/String#indexOf(+3). => method indexOf(param0: String, param1: Int): Int
+//   java/lang/Object#clone(). => protected method clone(): Object,
+//   java/lang/Object#hashCode(). => method hashCode(): Int,
+//   java/lang/String#substring(+1). => method substring(param0: Int, param1: Int): String
 // )
 

Lookup class primary constructor

@@ -483,8 +483,8 @@

Symbol("java/io/PrintStream#"), "print").take(3) // res47: Set[SymbolInformation] = HashSet( // java/io/PrintStream#print(+4). => method print(param0: Float): Unit, -// java/io/PrintStream#print(). => method print(param0: Boolean): Unit, -// java/io/PrintStream#print(+8). => method print(param0: Object): Unit +// java/io/PrintStream#print(+7). => method print(param0: String): Unit, +// java/io/PrintStream#print(+5). => method print(param0: Double): Unit // )

Overloaded methods can be inherited from supertypes.

diff --git a/docs/users/installation.html b/docs/users/installation.html index 0f02a8933..244a4ec2f 100644 --- a/docs/users/installation.html +++ b/docs/users/installation.html @@ -363,12 +363,24 @@

Command line

First, install the Coursier command-line interface.

-

Next, install a scalafix binary with Coursier

+

Then, download the Scalafix runner built with the latest version of Scala +(3.5.1)

cs install scalafix
 ./scalafix --version # Should say 0.13.0
 
+
+

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

+
cs bootstrap ch.epfl.scala:scalafix-cli_2.12.20:0.13.0 --main scalafix.cli.Cli -o scalafix_2.12
+cs bootstrap ch.epfl.scala:scalafix-cli_2.13.15:0.13.0 --main scalafix.cli.Cli -o scalafix_2.13
+cs bootstrap ch.epfl.scala:scalafix-cli_3.3.4:0.13.0 --main scalafix.cli.Cli -o scalafix_3-lts
+
+

Help

-
Scalafix 0.13.0+23-1bf297d2-SNAPSHOT
+
Scalafix 0.13.0+25-9c282a55-SNAPSHOT
 Usage: scalafix [options] [<path> ...]
 
 Scalafix is a refactoring and linting tool. Scalafix
@@ -540,10 +552,10 @@ 

// project/plugins.sbt addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.13.0") +resolvers += Resolver.sonatypeRepo("snapshots") -+dependencyOverrides += "ch.epfl.scala" % "scalafix-interfaces" % "0.13.0+23-1bf297d2-SNAPSHOT" ++dependencyOverrides += "ch.epfl.scala" % "scalafix-interfaces" % "0.13.0+25-9c282a55-SNAPSHOT"

If using the command-line interface

-
cs launch ch.epfl.scala:scalafix-cli_2.13.15:0.13.0+23-1bf297d2-SNAPSHOT -r sonatype:snapshots --main scalafix.cli.Cli -- --help
+
cs launch ch.epfl.scala:scalafix-cli_2.13.15:0.13.0+25-9c282a55-SNAPSHOT -r sonatype:snapshots --main scalafix.cli.Cli -- --help