Skip to content
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

Merged
merged 10 commits into from
Oct 31, 2019
Merged

Conversation

P0lip
Copy link
Contributor

@P0lip P0lip commented Oct 30, 2019

Closes #447

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

@P0lip P0lip added enhancement New feature or request breaking Pull requests that introduce a breaking change labels Oct 30, 2019
@P0lip P0lip self-assigned this Oct 30, 2019
@P0lip P0lip marked this pull request as ready for review October 30, 2019 12:33
expect(rules).toHaveProperty('test3.severity', DiagnosticSeverity.Warning);
});

it('rules with no severity and no recommended set are treated as warnings', () => {
Copy link
Contributor

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?

Copy link
Contributor Author

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

@P0lip P0lip merged commit ad4908f into develop Oct 31, 2019
@P0lip P0lip deleted the feat/default-recommended branch October 31, 2019 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Pull requests that introduce a breaking change enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make recommended: true by default and fix inheritence
2 participants