-
-
Notifications
You must be signed in to change notification settings - Fork 241
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: rules are recommended by default #719
Conversation
8780d4f
to
d71be0b
Compare
expect(rules).toHaveProperty('test3.severity', DiagnosticSeverity.Warning); | ||
}); | ||
|
||
it('rules with no severity and no recommended set are treated as warnings', () => { |
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.
This message makes it sound like there is a crossover between severity and recommended, and im not sure there is?
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.
There is some. Basically, if there is no severity set, we either set a default value or disable it. Whether we set a default value or set it to off depends on the value of recommended.
In code, it covers this line https://github.com/stoplightio/spectral/pull/719/files#diff-7ba880b07a41aa1bf9a31d0a3bca8445R116
Co-Authored-By: Phil Sturgeon <me@philsturgeon.uk>
Closes #447
Checklist
Does this PR introduce a breaking change?