reckon icon indicating copy to clipboard operation
reckon copied to clipboard

`ReckonExtension.setDefaultInferredScope` could take `org.ajoberstar.reckon.core.Scope`

Open x80486 opened this issue 3 years ago • 1 comments

I think ReckonExtension.setDefaultInferredScope/1 could be overloaded to accept org.ajoberstar.reckon.core.Scope as well — unless this one is not supposed to be used somehow.

I'm currently using it like:

reckon {
  setDefaultInferredScope(Scope.PATCH as String)
  setScopeCalc(calcScopeFromProp())
  setStageCalc(calcStageFromProp())
  stages("beta", "rc", "final")
}

...but I think accepting the enum as well is better because using constant is less error prone, and can provide a (very) small performance advantage.

x80486 avatar Feb 18 '22 12:02 x80486

Overload seems fine to me. Personally think the need to do an import to get the enum approach to work is going to be more error prone than using the string.

ajoberstar avatar Aug 14 '22 03:08 ajoberstar