-
Story
-
Resolution: Done
-
Major
-
2.0.0.Beta5, 2.0.0.Final
-
None
-
None
We could move some metadata to annotations
E.g. public RulePhase getPhase() -> @Metadata(phase=...)
With possibility to override by overriding the method, i.e. default impl would look for annotation.
(00:54:09) jsightler: Most of our rules aren't java and this isn't really an from that perspective.
(01:08:19) ozizka-FN: Most of our current rules. We don't know yet what users will really prefer. We should not shape that ratio to our expectations by making one option ugly and verbose.
(01:08:59) ozizka-FN: Most of our current rules are simple, because we ported them from Windup 0.x, which didn't allow for anything more complex (without additional java code)
Original:
public class CheckArchivesWithVictimsRules extends WindupRuleProvider { @Override public RulePhase getPhase() { return RulePhase.POST_DISCOVERY; } @Override public void enhanceMetadata(Context context) { super.enhanceMetadata(context); context.put(RuleMetadata.CATEGORY, "Java/Security"); } @Override public List<Class<? extends WindupRuleProvider>> getExecuteAfter() { return asClassList(UpdateVictimsDbRules.class, ComputeArchivesSHA512.class); } ...
New:
@Rule( phase = RulePhase.POST_DISCOVERY, after = { UpdateVictimsDbRules.class, ComputeArchivesSHA512 }, categories = {"java", "security"} ) public class CheckArchivesWithVictimsRules extends WindupRuleProvider { ...
- is related to
-
WINDUP-402 Change ruleset category metadata to tag-like system (make it a set of strings)
-
- Closed
-