https://github.com/iterable/scalafix-rules
custom scalafix rules
https://github.com/iterable/scalafix-rules
Last synced: 12 months ago
JSON representation
custom scalafix rules
- Host: GitHub
- URL: https://github.com/iterable/scalafix-rules
- Owner: Iterable
- License: apache-2.0
- Created: 2024-12-20T07:56:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-27T06:18:02.000Z (about 1 year ago)
- Last Synced: 2025-06-10T03:51:06.616Z (about 1 year ago)
- Language: Scala
- Size: 12.7 KB
- Stars: 0
- Watchers: 26
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Iterable Scalafix rules
Repository of custom scalafix rules for Iterable projects.
## Usage
You can use the rules in your project by adding a dependency on your preferred version of [the `scalafix-rules` artifact](https://mvnrepository.com/artifact/com.iterable/scalafix-rules):
```scala
ThisBuild / libraryDependencies += "com.iterable" %% "scalafix-rules" % "0.1.0" % ScalafixConfig
```
This will make the rules available to reference in your `.scalafix.conf` file.
You can also run a rule directly from the sbt console without including it in your build.
For example, to run version `0.1.0` of `NoFutureTraverse` dynamically in the `sbt` console:
```
scalafix dependency:NoFutureTraverse@com.iterable::scalafix-rules:0.1.0
```
## Available Rules
### NoFutureTraverse
Warns against or disallows the use of `Future.traverse` and `Future.sequence` in your Scala code, to prevent a potentially unbounded number of concurrent tasks from being run at once.
```hocon
rules = [
# ...
NoFutureTraverse
]
NoFutureTraverse {
isError = false # Whether to treat violations as errors (default: false)
extraMessage = null # Additional deprecation message. Can be used to suggest an alternative.
}
```