Skip to content

Commit

Permalink
Add a check-missing-dfns CLI that detects missing definitions (#439)
Browse files Browse the repository at this point in the history
The definitions checker compares CSS, dfns, and IDL extracts created by Reffy
to detect CSS/IDL terms that do not have a corresponding dfn in the spec.

The checker outputs Markdown that is typically suitable for inclusion in a
GitHub issue. It may also return the result as JSON.

Some specific scenarios are being handled to avoid false positives:
- Ignore constructor definitions for HTML elements, the spec handles them
separately
- Ignore specs that don't respect the dfns data model such as WebGL
- Work around ReSpec's issue https://github.com/w3c/respec/issues/3200
- Ignore special getter, setter, deleter methods
- Handle overloaded methods (imperfectly)

Also the checker reports warnings when it could find a definitions that is
correct but not "perfect":
- when a method definition exists but parameter names are different, e.g.
`setCustomValidity(message)` instead of `setCustomValidity(error)`.
- when method definition does not include the parameters, e.g. `add()`.
- when a method definition exists without parentheses, e.g. `drawImage`.
- when a single method definition exists for overloaded methods, e.g.
`setRangeText` or `drawFocusIfNeeded`.
  • Loading branch information
tidoust authored Nov 16, 2020
1 parent 04a4a7f commit 07a60de
Showing 1 changed file with 549 additions and 0 deletions.
Loading

0 comments on commit 07a60de

Please sign in to comment.