-
-
Notifications
You must be signed in to change notification settings - Fork 239
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(cli): demand some ruleset to be present #1699
Conversation
3959353
to
de8e994
Compare
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.
Can we change the error message for the CLI to say something like "Please provide a ruleset using the --ruleset CLI argument" or maybe just print the standard "Usage: " when it's used incorrectly? (So that users are told how to use it correctly instead of just told an error)
Thanks! |
🎉 This PR is included in version @stoplight/spectral-cli-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version @stoplight/spectral-core-v1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# @stoplight/spectral-cli-v1.0.0 (2021-07-08) ### Features * **cli:** demand some ruleset to be present ([#1699](#1699)) ([3baba29](3baba29)) * **cli:** implement --stdin-filepath flag ([#1712](#1712)) ([45b15a2](45b15a2)) * **core:** support overrides in rulesets ([#1684](#1684)) ([153d685](153d685)) * **core:** use double quotes in errors reported by Ajv ([#1718](#1718)) ([dd2a166](dd2a166)) * **ruleset-migrator:** implement ruleset migrator ([#1698](#1698)) ([efa5c50](efa5c50)) * **ruleset-migrator:** inline external rulesets & support exceptions ([#1711](#1711)) ([2a1d2d3](2a1d2d3))
My CI build that use the latest version of Spectral to validate OpenAPI specs, now fails because of this change. Where can I find the upgrade guide that will tell me where I can find a generic ruleset (which was not needed before)? There is nothing helpful in the CHANGELOG. |
Hey @dolmen!
and we have a more extensive guide about style guides over here https://github.com/stoplightio/spectral/blob/develop/docs/getting-started/3-rulesets.md There's also a migration guide available https://github.com/stoplightio/spectral/blob/develop/docs/migration-guides/6.0.md |
I did this because that's what is written in the ruleset documentation: echo 'extends: "spectral:oas"' > .spectral.yml I notice that here |
Related to #1698
Checklist
Does this PR introduce a breaking change?
Additional context
Bear in mind that this only relevant to the situation where you do not provide a ruleset and have no
.spectral.{js,json,yaml,yml}
at the same time.We no longer load any default ruleset, thus it's on user now to specify some.