For projects built with npm (e.g. VE, OOjs UI) this could be relatively easy, but for MW core I imagine it's a bit harder to parse .php files.
(For VE we'd want this blocking merge, but that's a distinct conversation.)
Version: unspecified
Severity: enhancement