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

fix(rulesets): operation-tags should fail on empty array #2050

Merged
merged 1 commit into from
Feb 7, 2022

Conversation

eazy-g
Copy link
Contributor

@eazy-g eazy-g commented Feb 4, 2022

Because an empty array is truthy in JS, the operation-tags rule needs to explicitly check on number of items in the array

Checklist

  • Tests added / updated
  • Docs added / updated

Does this PR introduce a breaking change?

  • Yes
  • No

Copy link
Contributor

@P0lip P0lip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, thanks!

@P0lip P0lip added the t/bug Something isn't working label Feb 7, 2022
@P0lip P0lip merged commit a4c421f into stoplightio:develop Feb 7, 2022
stoplight-bot pushed a commit that referenced this pull request Feb 7, 2022
# [@stoplight/spectral-rulesets-v1.4.2](https://github.com/stoplightio/spectral/compare/@stoplight/spectral-rulesets-v1.4.1...@stoplight/spectral-rulesets-v1.4.2) (2022-02-07)

### Bug Fixes

* **rulesets:** operation-tags should fail on empty array ([#2050](#2050)) ([a4c421f](a4c421f))
@stoplight-bot
Copy link
Collaborator

🎉 This PR is included in version @stoplight/spectral-rulesets-v1.4.2 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released t/bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants