Skip to content

Commit 1a7b2ff

Browse files
authored
Merge pull request #42 from dwijnand/prep-release
2 parents ec5fe1c + 32cae32 commit 1a7b2ff

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ scala:
99
- 2.13
1010
script: 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+
1222
notifications:
1323
email:
1424
on_success: never

README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff 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
```
1010
sbt ~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`

project/plugins.sbt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
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")

0 commit comments

Comments
 (0)