Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.67 KB

readme.md

File metadata and controls

34 lines (26 loc) · 1.67 KB

scalafix-migrate-zio-macros Scala version support

Scalafix rules for ZIO macro annotations migration

This project contains set of rules allowing to migrate Scala 2 macro-annotations based utilities of ZIO ecosystem.

Available code generation rules:

ZIOAccessibleCodeGen

Rule detects usages of zio.macros.accessible annotations and generates accessors for annotated traits based on original macro-annonations algorithm. Support:

  • - zio.ZIO (and it's main aliases)
  • - zio.ZManaged (and it's main aliases)
  • - zio.ZStream, zio.ZSink (and it's main aliases)
  • - accessors for normal methods
  • - @accessible - supported
  • - @accessibleM[_] - not supported yet
  • - @accessibleMM[_, _] - not supported yet
  • - @throwing - not supported yet

ZIOMockableCodeGen

Rule detects usages of zio.macros.mockable annotations and generates mocks for annotated traits based on original macro-annonations algorithm. Support:

  • - zio.ZIO (and it's main aliases)
  • - zio.ZManaged (and it's main aliases)
  • - zio.ZStream, zio.ZSink (and it's main aliases)
  • - overloaded methods
  • - generic, type parametrized methods

Usage

All rules require compilation with SemanticDB enabled and are targeting Scalafix 0.12.x For information on how to use this projects refer to Scalafix user guide