apigee / apigeelint

Static code analysis for Apigee proxy bundles to encourage API developers to use best practices and avoid anti-patterns.
Apache License 2.0
92 stars 71 forks source link

for Issue #146, checking Condition on FaultRule #316

Closed DinoChiesa closed 2 years ago

DinoChiesa commented 2 years ago

This addresses issue #146 .

This change corrects the logic in plugin FR001, so that:

DinoChiesa commented 2 years ago

@kurtkanaskie - I would like you to review this logic.

DinoChiesa commented 2 years ago

FYI This change includes test cases for both ProxyEndpoint and TargetEndpoint. The evaluation order of FaultRules is different across these, and the test cases verify the behavior of the plugin is correct for both of them.

kurtkanaskie commented 2 years ago

LGTM Minor suggestion: add first encountered as shown below to remind developers of the order of flow for the Fault Rules?

More than one FaultRule, and the first encountered FaultRule (OtherFaults) has no Condition or the Condition is empty.

DinoChiesa commented 2 years ago

ok I've added the new plugin. Please review again.