ducktape 0.2.9
ducktape 0.2.9
This release brings lints to Field.modify{Source,Dest}Names and Case.modify{Source,Dest}Names which provide warnings when a rename config doesn't actually do anything:
case class Source(int: Int, level1: SourceEnum)
case class Dest(int: Int, level1: DestEnum)
enum DestEnum {
case One(int: Int, str: String)
case Two(int: Int, str: String, level1: DestLevel1, level2: DestLevel1Enum)
case Three(int: Int, str: String)
}
enum SourceEnum {
case One(int: Int, str: String)
case Two(int: Int, str: String, level1: SourceLevel1, level2: SourceLevel1Enum)
case Three(int: Int, str: String)
}
enum SourceLevel1Enum {
case One
case Two
}
enum DestLevel1Enum {
case One
case Two
}
case class SourceLevel1(int: Int)
case class DestLevel1(int: Int)
assertTransformsConfigured(
Source(1, SourceEnum.Two(2, "2", SourceLevel1(3), SourceLevel1Enum.Two)),
Dest(1, DestEnum.Two(2, "2", DestLevel1(3), DestLevel1Enum.Two))
)(
Case.modifySourceNames(_.toLowerCase).local(_.level1.at[SourceEnum.Two])
// ^ WARNING: Config is not actually being used anywhere
)
)
...or when one rename overrides another:
test("local flags with higher priority overwrite flags with lower priority") {
case class Source(int: Int, str: String)
case class Dest(INT_ADDITION: Int, STR: String)
assertTransformsConfigured(
Source(1, "asd"),
Dest(1, "asd")
)(
Field.modifyDestNames(_.toUpperCase.replace("_WHATEVER_THIS_FLAGS_HAS_LOWER_PRIO", "")).local(a => a),
// ^ WARNING: Config is being overridden by Field.modifyDestNames(_.toLowerCase.replace("_addition", "")).local(a => a) @ FlagSuite.scala:523:82
),
Field.modifyDestNames(_.toLowerCase.replace("_addition", "")).local(a => a)
)
}
What's Changed
- Update sbt-mdoc to 2.7.0 by @scala-steward in https://github.com/arainko/ducktape/pull/259
- Update sbt-mdoc to 2.7.1 by @scala-steward in https://github.com/arainko/ducktape/pull/260
- Update README.md by @arainko in https://github.com/arainko/ducktape/pull/262
- Unify
Mapaccess in Planner by @arainko in https://github.com/arainko/ducktape/pull/263 - Update scalafmt-core to 3.9.5 by @scala-steward in https://github.com/arainko/ducktape/pull/265
- Update munit to 1.1.1 by @scala-steward in https://github.com/arainko/ducktape/pull/264
- Update scalafmt-core to 3.9.6 by @scala-steward in https://github.com/arainko/ducktape/pull/266
- Update scala3-library, ... to 3.3.6 by @scala-steward in https://github.com/arainko/ducktape/pull/268
- Update sbt-scalafix to 0.14.3 by @scala-steward in https://github.com/arainko/ducktape/pull/267
- Publish using the central host by @arainko in https://github.com/arainko/ducktape/pull/269
- Update sbt, scripted-plugin to 1.11.0 by @scala-steward in https://github.com/arainko/ducktape/pull/271
- Flag lints by @arainko in https://github.com/arainko/ducktape/pull/272
- Update scalafmt-core to 3.9.7 by @scala-steward in https://github.com/arainko/ducktape/pull/273
- Update sbt-scalajs, scalajs-library_2.13, ... to 1.19.0 by @scala-steward in https://github.com/arainko/ducktape/pull/261
- Update sbt, scripted-plugin to 1.11.1 by @scala-steward in https://github.com/arainko/ducktape/pull/274
- bump sbt-typelevel by @arainko in https://github.com/arainko/ducktape/pull/276
- Update auxlib, clib, javalib, nativelib, ... to 0.5.8 by @scala-steward in https://github.com/arainko/ducktape/pull/277
- Update sbt, scripted-plugin to 1.11.2 by @scala-steward in https://github.com/arainko/ducktape/pull/278
Full Changelog: https://github.com/arainko/ducktape/compare/v0.2.8...v0.2.9