Introduce a apitool CLI for the substrate API. - #1162
Introduce a apitool CLI for the substrate API.#1162Julian Gutierrez Oschmann (juli4n) wants to merge 1 commit into
apitool CLI for the substrate API.#1162Conversation
14230d8 to
75ad17e
Compare
75ad17e to
1a2c8da
Compare
The idea is to bundle automation related to the API here. Initially, there is only a single `validate` command to run a set of lint rules that enforce that the API adheres to the style guide. This should help us prevent regressions / deviations when adding features. The linter generates validation errors today, so we are not enforcing this as part of the presubmit checks. Although we might want to enforce that soon, once we fix the errors. There is no support for violation exemptions for now. In the future, we could add another command to, for example, generate a reference documentation for the whole API.
1a2c8da to
c2616aa
Compare
| The `apitool` is a CLI that automates tasks related to the Substrate API. | ||
|
|
||
| The only command it has today is a command to run a set of validations that enforce | ||
| that the API adheres to the Substrate API style guide. |
There was a problem hiding this comment.
Any reason not to add a verify script to enforce it?
We should add even just a hardcoded exception list that will be removed over time, so there doesn't need to be a concept in the future to allow this, but so we can start ratcheting fixes? Doing everything in bulk is harder. |
Benjamin Elder (BenTheElder)
left a comment
There was a problem hiding this comment.
I can't help but feel like there's a lot of repetitive and verbose code looking for a better abstraction but I'd need more time to think about how we might approach that
golangci-lint like kube-api-linter perhaps
The idea is to bundle automation related to the API here. For now, there is only a single
validatecommand that runs a set of lint rules to enforce that the API adheres to the style guide. This should help us prevent regressions / deviations when modifying it.These are not enforced as part of the presubmit checks, although we might want to enforce that soon (right after we close the existing gaps? see #1163). There is no support for violation exemptions for now.
In the future, we could add another command to, for example, generate a reference documentation for the whole API.