Skip to content

Commit

Permalink
Merge pull request #1905 from gabro/master
Browse files Browse the repository at this point in the history
s/rewrites/rules and update scalafix version in the README
  • Loading branch information
ceedubs authored Sep 12, 2017
2 parents 5bb0252 + 4d9d333 commit 7895688
Show file tree
Hide file tree
Showing 13 changed files with 217 additions and 296 deletions.
6 changes: 3 additions & 3 deletions scalafix/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Scalafix rewrites for cats
# Scalafix rules for cats

## Try this!

Install the scalafix sbt plugin (globally or in a specific project):

```scala
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.5.0-M3")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.5.0-RC2")
```

run
Expand All @@ -14,7 +14,7 @@ run
sbt scalafix github:typelevel/cats/v1.0.0
```

## Available rewrites
## Available rules

- [x] All Unapply enabled methods, e.g. sequenceU, traverseU, etc. are removed. Unapply enabled syntax ops are also removed. Please use the partial unification SI-2712 fix instead. The easiest way might be this sbt-plugin.

Expand Down
4 changes: 2 additions & 2 deletions scalafix/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
val V = _root_.scalafix.Versions
scalaVersion in ThisBuild := V.scala212

lazy val rewrites = project.settings(
lazy val rules = project.settings(
libraryDependencies += "ch.epfl.scala" %% "scalafix-core" % V.version
)

Expand Down Expand Up @@ -35,5 +35,5 @@ lazy val tests = project
classDirectory.in(input, Compile).value
)
)
.dependsOn(input, rewrites)
.dependsOn(input, rules)
.enablePlugins(BuildInfoPlugin)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rewrite = "scala:fix.v1_0_0.RemoveCartesianBuilder"
rule = "scala:fix.v1_0_0.RemoveCartesianBuilder"
*/
package fix
package to1_0_0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rewrite = "scala:fix.v1_0_0.RemoveCartesianBuilder"
rule = "scala:fix.v1_0_0.RemoveCartesianBuilder"
*/
package fix
package to1_0_0
Expand Down
2 changes: 1 addition & 1 deletion scalafix/input/src/main/scala/fix/v1_0_0/RemoveSplit.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rewrite = "scala:fix.v1_0_0.RemoveSplit"
rule = "scala:fix.v1_0_0.RemoveSplit"
*/
package fix
package to1_0_0
Expand Down
4 changes: 2 additions & 2 deletions scalafix/input/src/main/scala/fix/v1_0_0/RemoveUnapply.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rewrite = "scala:fix.v1_0_0.RemoveUnapply"
/*
rule = "scala:fix.v1_0_0.RemoveUnapply"
*/
package fix
package to1_0_0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rewrite = "scala:fix.v1_0_0.RenameFreeSuspend"
/*
rule = "scala:fix.v1_0_0.RenameFreeSuspend"
*/
package fix
package to1_0_0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rewrite = "scala:fix.v1_0_0.RenameInjectProdAndCoproduct"
/*
rule = "scala:fix.v1_0_0.RenameInjectProdAndCoproduct"
*/
package fix
package to1_0_0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rewrite = "scala:fix.v1_0_0.RenameReducibleMethods"
/*
rule = "scala:fix.v1_0_0.RenameReducibleMethods"
*/
package fix
package to1_0_0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rewrite = "scala:fix.v1_0_0.RenameTupleApplySyntax"
rule = "scala:fix.v1_0_0.RenameTupleApplySyntax"
*/
package fix
package to1_0_0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
rewrite = "scala:fix.v1_0_0.SimplifyEitherTLift"
rule = "scala:fix.v1_0_0.SimplifyEitherTLift"
*/
package fix
package to1_0_0
Expand Down
278 changes: 0 additions & 278 deletions scalafix/rewrites/src/main/scala/fix/Cats_v1_0_0.scala

This file was deleted.

Loading

0 comments on commit 7895688

Please sign in to comment.