File tree Expand file tree Collapse file tree 3 files changed +20
-11
lines changed Expand file tree Collapse file tree 3 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 99 - 2.13
1010script : sbt test
1111
12+ stages :
13+ - name : test
14+ - name : release
15+ if : ((branch = master AND type = push) OR (tag IS present)) AND NOT fork
16+
17+ jobs :
18+ include :
19+ - stage : release
20+ script : sbt ci-release
21+
1222notifications :
1323 email :
1424 on_success : never
Original file line number Diff line number Diff line change @@ -4,19 +4,17 @@ Scalafix will support 2.13 and 2.11 with cross-building ExplicitNonNullaryApply
44
55# Scalafix Rewrites for Scala
66
7- ## To develop the rule
7+ ## To develop a rewrite
88
99```
1010sbt ~tests/test
11- # edit rewrites/src/main/scala/fix/Scala213.scala
11+ # edit rewrites/src/main/scala/...
1212```
1313
14- ## To run the rule
14+ ## To run the rewrites
1515
16- 0 . Publish the rule: ` publishLocal `
17- 1 . Add sbt-scalafix: ` addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.17") `
18- 2 . Add SemanticDB: ` addCompilerPlugin(scalafixSemanticdb) `
19- 3 . Configure Semantic DB: ` scalacOptions ++= List("-Yrangepos", "-P:semanticdb:synthetics:on") `
20- 4 . Run a rule you want: ` scalafix dependency:RULE_NAME@org.scala-lang:scala-rewrites:0.1.0-SNAPSHOT `
21- - For example, you can run Varargs rule by: ` scalafix dependency:fix.scala213.Varargs@org.scala-lang:scala-rewrites:0.1.0-SNAPSHOT `
22- 5 . Run the rule on test sources: ` Test/scalafix dependency:RULE_NAME@org.scala-lang:scala-rewrites:0.1.0-SNAPSHOT `
16+ 1 . [ Install Scalafix] ( https://scalacenter.github.io/scalafix/docs/users/installation.html )
17+ 2 . Enable synthetics in SemanticDB; e.g. ` semanticdbOptions += "-P:semanticdb:synthetics:on" ` in sbt 1.3+
18+ 3 . Run the [ external rule] ( https://scalacenter.github.io/scalafix/docs/rules/external-rules.html ) , e.g.:
19+ * ` scalafix dependency:ExplicitNonNullaryApply@org.scala-lang:scala-rewrites:VERSION `
20+ * ` Test/scalafix dependency:ExplicitNonNullaryApply@org.scala-lang:scala-rewrites:VERSION `
Original file line number Diff line number Diff line change 1- addSbtPlugin(" ch.epfl.scala" % " sbt-scalafix" % " 0.9.17" )
1+ addSbtPlugin(" com.geirsson" % " sbt-ci-release" % " 1.5.3" )
2+ addSbtPlugin(" ch.epfl.scala" % " sbt-scalafix" % " 0.9.17" )
You can’t perform that action at this time.
0 commit comments