Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kitlangton/fixins
A salubrious assortment of Scalafix rules
https://github.com/kitlangton/fixins
Last synced: 6 days ago
JSON representation
A salubrious assortment of Scalafix rules
- Host: GitHub
- URL: https://github.com/kitlangton/fixins
- Owner: kitlangton
- Created: 2024-03-29T17:12:59.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-03-29T19:43:21.000Z (9 months ago)
- Last Synced: 2024-11-10T07:39:12.690Z (about 2 months ago)
- Language: Scala
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fixins
[![Release Artifacts][Badge-SonatypeReleases]][Link-SonatypeReleases]
[![Snapshot Artifacts][Badge-SonatypeSnapshots]][Link-SonatypeSnapshots][Badge-SonatypeReleases]: https://img.shields.io/nexus/r/https/oss.sonatype.org/io.github.kitlangton/fixins_2.13.svg "Sonatype Releases"
[Badge-SonatypeSnapshots]: https://img.shields.io/nexus/s/https/oss.sonatype.org/io.github.kitlangton/fixins_2.13.svg "Sonatype Snapshots"
[Link-SonatypeSnapshots]: https://oss.sonatype.org/content/repositories/snapshots/io/github/kitlangton/fixins_2.13/ "Sonatype Snapshots"
[Link-SonatypeReleases]: https://oss.sonatype.org/content/repositories/releases/io/github/kitlangton/fixins_2.13/ "Sonatype Releases"> A sumptuous Scalafix smorgasbord.
## Installation
You can add `fixins` to your project by adding the following line to your `build.sbt`:
```scala
ThisBuild / scalafixDependencies += "io.github.kitlangton" %% "fixins" % "0.0.4"
```Then you can add the rules to your `.scalafix.conf`:
```scala
rules = [
SimplifyZIOTypes
]
```# Rules
### `SimlpifyZIOTypes`
```shell
sbt 'scalafix dependency:[email protected]::fixins:0.0.4'
```This rule simplifies ZIO types by replacing `ZIO[R, E, A]` and `ZLayer[R, E, A]` with their more specific type aliases
whenever possible.```scala
// ZIO Transformations
ZIO[Any, Throwable, Int] => Task[Int]
ZIO[Any, Nothing, Int] => UIO[Int]
ZIO[R, Throwable, Int] => RIO[R, Int]
ZIO[R, Nothing, Int] => URIO[R, Int]// ZLayer Transformations
ZLayer[Any, Throwable, Int] => TaskLayer[Int]
ZLayer[Any, Nothing, Int] => ULayer[Int]
ZLayer[R, Throwable, Int] => RLayer[R, Int]
ZLayer[R, Nothing, Int] => URLayer[R, Int]
```