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
91 stars 71 forks source link

fix: correct PD003 error message #432

Closed DinoChiesa closed 4 months ago

DinoChiesa commented 4 months ago

The error message for PD003 is unclear and confusing. Before this change, it reads:

Endpoint has an unconditional RouteRule that is not the final RouteRule. It will be ignored.

It is not clear what "It" refers to, in "It will be ignored." By convention in English, "It" to begin a sentence normally refers to the subject of the prior sentence. But here, "It" refers to the final RouteRule. So that's confusing.

The message is clearer when stated more simply:

Endpoint has an unconditional RouteRule that is not the final RouteRule.

Accompanying this change, there's some cleanup of commented blocks of code, and formatting changes via prettier .