Skip to content

Add lint to ensure kKnownWGSLLanguageFeatures is complete - #4701

Merged
kainino0x merged 2 commits into
gpuweb:mainfrom
kainino0x:requires
Sep 9, 2026
Merged

Add lint to ensure kKnownWGSLLanguageFeatures is complete#4701
kainino0x merged 2 commits into
gpuweb:mainfrom
kainino0x:requires

Conversation

@kainino0x

Copy link
Copy Markdown
Collaborator

This is to prevent tests from being written against WGSL language features without adding them to kKnownWGSLLanguageFeatures so that they will be tested by the wgsl_matches_api test.

It's not 100% foolproof, but should work pretty well. Best I think we can do without updating eslint and installing an extra dep to allow the eslint config to be written in TypeScript so it can import the same list that we use in the CTS.

Tested locally, the lint fails if I take any of the items out of the new list.

Issue: https://crbug.com/557328524


Requirements for PR author:

  • [n/a] All missing test coverage is tracked with "TODO" or .unimplemented().
  • New helpers are /** documented */ and new helper files are found in helper_index.txt.
  • [n/a] Test behaves as expected in a WebGPU implementation. (If not passing, explain above.)
  • [n/a] Test have be tested with compatibility mode validation enabled and behave as expected. (If not passing, explain above.)

Requirements for reviewer sign-off:

  • [n/a] Tests are properly located.
  • [n/a] Test descriptions are accurate and complete.
  • [n/a] Tests provide complete coverage (including validation control cases). Missing coverage MUST be covered by TODOs.
  • [n/a] Tests avoid over-parameterization (see case count report).

When landing this PR, be sure to make any necessary issue status updates.

Convert eslintrc from JSON to JS to make this easier to maintain.
@kainino0x
kainino0x requested a review from dj2 September 9, 2026 05:37
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Results for build job (at ad6f6ad):

 Test case/subcase counts did not change.

@kainino0x
kainino0x enabled auto-merge (squash) September 9, 2026 17:55
@kainino0x
kainino0x disabled auto-merge September 9, 2026 17:55
@kainino0x
kainino0x enabled auto-merge (squash) September 9, 2026 17:55
@kainino0x
kainino0x merged commit 99fa79e into gpuweb:main Sep 9, 2026
1 check passed
@kainino0x
kainino0x deleted the requires branch September 9, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants