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

JSON linter: don't allow version_added === version_removed #3531

Closed
a2sheppy opened this issue Feb 26, 2019 · 6 comments
Closed

JSON linter: don't allow version_added === version_removed #3531

a2sheppy opened this issue Feb 26, 2019 · 6 comments
Labels
linter Issues or pull requests regarding the tests / linter of the JSON files.

Comments

@a2sheppy
Copy link
Contributor

We have a couple of places here and there where version_added is invalidly the same as version_removed; we need to update the linter to catch this.

@ddbeck ddbeck added the linter Issues or pull requests regarding the tests / linter of the JSON files. label Feb 26, 2019
@ddbeck
Copy link
Collaborator

ddbeck commented Feb 26, 2019

Would you mind sharing a couple of these examples?

@a2sheppy
Copy link
Contributor Author

I just submitted a PR that will fix them, but RTCPeerConnection.onaddstream has this problem, for instance:

https://github.com/mdn/browser-compat-data/blob/master/api/RTCPeerConnection.json#L1999

@ExE-Boss
Copy link
Contributor

@queengooborg
Copy link
Contributor

+1 for this. Having a feature removed in the same version it was introduced in doesn’t make any sense!

@Elchi3
Copy link
Member

Elchi3 commented Feb 27, 2019

I thought this would be checked here https://github.com/mdn/browser-compat-data/blob/master/test/test-versions.js#L51

But maybe it is suitable to test this in the consistency tests as well. I haven't reviewed it yet.

@ExE-Boss
Copy link
Contributor

The test should be compareVersions(a, b) >= 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter Issues or pull requests regarding the tests / linter of the JSON files.
Projects
None yet
Development

No branches or pull requests

5 participants