pinterest / arcanist-linters

A collection of custom Arcanist linters
Apache License 2.0
63 stars 45 forks source link

Revise the OpenAPI validator / linter #61

Closed jparise closed 3 years ago

jparise commented 3 years ago
steverice commented 3 years ago

The --verbose option was only added in a recent version of the openapi-validator. Before that the equivalent flag was --print_rule_names.

We should have some nod to backwards compatibility. I think any of these would be acceptable:

jparise commented 3 years ago

I landed on just adding a note to the README.md about the version requirement. There unfortunately isn't a way for an individual linter to assert a default version requirement, and reimplementing the version check locally feels like too much work for this situation.

I also made the parser handle missing rules, and because the tool doesn't error for unknown command line options, we don't need to add it conditionally.