-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(new-rule): ibm-operation-summary-length #663
Conversation
Adds a rule that verifies operation summaries are 80 characters or less in length, based on the summary writing guidance in the API Handbook. Signed-off-by: Dustin Popp <dpopp07@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good altogether!
Re: the merging question. I think it's fine to leave this as a separate rule, but if we decide to merge it, I'd choose the ibm-operation-summary
. I think it makes a bit more sense to have the null || len(summary) > 80
logic in the same rule. Also, the sentence style can be changed in the future, by adding new criteria, for example "start with capital letter".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Since we already have two existing rules for summary-related stuff, my vote would be to keep this one separate as well.
# @ibm-cloud/openapi-ruleset [1.16.0](https://github.com/IBM/openapi-validator/compare/@ibm-cloud/openapi-ruleset@1.15.9...@ibm-cloud/openapi-ruleset@1.16.0) (2024-05-09) ### Features * **new-rule:** ibm-operation-summary-length ([#663](#663)) ([901cc1a](901cc1a))
🎉 This PR is included in version 1.16.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.17.0 🎉 The release is available on npm package (@latest dist-tag) Your semantic-release bot 📦🚀 |
PR summary
Adds a rule that verifies operation summaries are 80 characters or less in length, based on the summary writing guidance in the API Handbook.
A question for the PR reviewers. We already have these existing rules:
Should this check be merged into one of the existing rules or does it belong as its own rule? The granularity is nice for configuration but it might be confusing to have too many rules doing such similar things. What do y'all think?
PR Checklist
General checklist
Please make sure that your PR fulfills the following requirements:
Checklist for adding a new validation rule: