Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ReckonExtension.setDefaultInferredScope could take org.ajoberstar.reckon.core.Scope #175

Closed
x80486 opened this issue Feb 18, 2022 · 1 comment

Comments

@x80486
Copy link

x80486 commented Feb 18, 2022

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.

@ajoberstar
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants