Skip to content

Conversation

@caugner
Copy link
Contributor

@caugner caugner commented Apr 18, 2025

Summary

Adds a new overlap linter that

  • checks for overlapping version ranges, e.g. [{ added: 1, removed: 3 }, { added: 2 }],
  • fixes them by using the newer version_added as version_removed for the previous.

Notes:

  • Each prefix and alternative name is considered as separate "statement groups" that can overlap, while statements within a group must not.
  • Ignores statements with flags for now, as these have a separate linter, which forbids version_removed.

Test results and supporting details

Related issues

Fixes #26543.

Extracted manual fixes to:

@github-actions github-actions bot added infra Infrastructure issues (npm, GitHub Actions, releases) of this project linter Issues or pull requests regarding the tests / linter of the JSON files. size:l [PR only] 101-1000 LoC changed data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API scripts Issues or pull requests regarding the scripts in scripts/. labels Apr 18, 2025
@caugner caugner force-pushed the 26543-lint-overlapping-ranges branch from 013ff29 to 266e9c1 Compare April 18, 2025 13:45
@github-actions github-actions bot added the data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML label Apr 18, 2025
@caugner caugner force-pushed the 26543-lint-overlapping-ranges branch from 7d4025c to 3a99c03 Compare April 18, 2025 17:08
@github-actions github-actions bot added data:http Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG data:mathml Compat data for MathML features. https://developer.mozilla.org/docs/Web/MathML size:xl [PR only] >1000 LoC changed and removed size:l [PR only] 101-1000 LoC changed labels Apr 18, 2025
@caugner caugner force-pushed the 26543-lint-overlapping-ranges branch 2 times, most recently from f531da2 to 6bbf939 Compare April 18, 2025 18:11
@caugner caugner changed the title feat(lint): check for overlapping version ranges feat(lint): check + fix overlapping version ranges Apr 18, 2025
@caugner caugner marked this pull request as draft April 22, 2025 09:22
@caugner caugner force-pushed the 26543-lint-overlapping-ranges branch from 1972cc5 to 5e89bb7 Compare April 22, 2025 11:31
@github-actions github-actions bot added size:l [PR only] 101-1000 LoC changed and removed size:xl [PR only] >1000 LoC changed labels Apr 22, 2025
@caugner caugner force-pushed the 26543-lint-overlapping-ranges branch 4 times, most recently from 78ecd59 to 1870ea1 Compare April 22, 2025 12:12
@caugner
Copy link
Contributor Author

caugner commented Apr 22, 2025

All non-autofixable errors are fixed in #26595 and #26596.

@caugner caugner marked this pull request as ready for review May 9, 2025 14:05
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2025

Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs).

caugner added 2 commits May 9, 2025 16:12
Ignores support statements with flags, which have their own linter.
@caugner caugner force-pushed the 26543-lint-overlapping-ranges branch from 628baed to 1db0bf4 Compare May 9, 2025 14:12
@caugner caugner merged commit d94c8a9 into main May 16, 2025
11 checks passed
@caugner caugner deleted the 26543-lint-overlapping-ranges branch May 16, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

data:api Compat data for Web APIs. https://developer.mozilla.org/docs/Web/API data:css Compat data for CSS features. https://developer.mozilla.org/docs/Web/CSS data:html Compat data for HTML elements. https://developer.mozilla.org/docs/Web/HTML data:http Compat data for HTTP features. https://developer.mozilla.org/docs/Web/HTTP data:js Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript data:mathml Compat data for MathML features. https://developer.mozilla.org/docs/Web/MathML data:svg Compat data for SVG features. https://developer.mozilla.org/docs/Web/SVG data:webext Compat data for Browser Extensions. https://developer.mozilla.org/Add-ons/WebExtensions infra Infrastructure issues (npm, GitHub Actions, releases) of this project linter Issues or pull requests regarding the tests / linter of the JSON files. scripts Issues or pull requests regarding the scripts in scripts/. size:l [PR only] 101-1000 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linter allows overlapping statements

2 participants