https://github.com/guardrail-dev/guardrail-scalafix-rules
Some scalafix rules to help do automated refactor work in guardrail repo(s)
https://github.com/guardrail-dev/guardrail-scalafix-rules
Last synced: 11 months ago
JSON representation
Some scalafix rules to help do automated refactor work in guardrail repo(s)
- Host: GitHub
- URL: https://github.com/guardrail-dev/guardrail-scalafix-rules
- Owner: guardrail-dev
- Created: 2020-04-10T05:11:35.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-10-10T23:15:03.000Z (over 2 years ago)
- Last Synced: 2025-06-19T19:15:17.424Z (12 months ago)
- Language: Scala
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
scalafix rules to automate work done in guardrail
===
Available rules
---
| Name | Description |
| --------------------------- | ----------------------------------------------------------------------------- |
| GuardrailInterpreter2TF | Given an object definition with an `def apply[A](term: F[A]): G[A] = term match { case Foo(a, b) => ...; ... }` as well as a number of `def foo(a: A, b: B): F[C] = ???` stubs, apply a set of heuristics to migrate the interpreter bodies from `~>` to the associated Tagless Final method stubs.
This only rewrites functions that have `???` as the body and that have terms that very closely match the stub method names (at the time of writing, only the first letter of the method is lower-cased. If the method is not found, it does nothing for that term). |
| GuardrailInterface2TF | Given a `Free[F, A]` with an implicit `InjectK`, presume quite a bit about the structure of the `Free` interpreter and transform them to the equivalent Tagless Final encoding |
| GuardrailScalaResponseTypes | Given some source tree that looks to follow the guardrail-generated `def foo(respond: FooResource.fooResponse.type)(...): FooResource.fooResponse` style, rewrite the `fooResponse` type to be `FooResponse`, reflecting a change in term case normalization in guardrail |
| GuardrailIterableToVector | Given some source tree that looks to follow the guardrail-generated `def foo(respond: ...)(bar: Iterable[String])` style, rewrite parameters that use `Iterable` as the `array` type to `Vector`, reflecting the change in [#1407](https://github.com/guardrail-dev/guardrail/pull/1407) |