Skip to content

lint-codes: add new modes of operation

sheaf requested to merge sheaf/ghc:list-codes into master

This MR adds two new modes of operation to the lint-codes utility:

  • list - list all statically used diagnostic codes
  • outdated - list all outdated diagnostic codes

The previous behaviour is now:

  • test - test consistency and coverage of diagnostic codes

It also simplifies the workflow for running the lint-codes utility with Hadrian, by adding two new targets (codes and codes:outdated) which list out used (respectively, outdated) diagnostic codes.

This is all aimed at improving the user experience for new contributors who are considering working on improving the test coverage of diagnostic codes.

Finally, this MR also changes the codes coverage check to avoid using git grep in order to fix #23843 (closed).

(The full-ci label is there to to ensure I'm not breaking anything with the test being able to be run in cross-compiler pipeline.)

Edited by sheaf

Merge request reports