swiftlang/swift

We should have a tool that finds unused diagnostic IDs

Open

#67.306 aberto em 14 de jul. de 2023

Ver no GitHub
 (8 comments) (0 reactions) (1 assignee)Swift (10.719 forks)batch import
QoIcompilerdevelopment toolsfeaturegood first issueutils

Métricas do repositório

Stars
 (69.989 stars)
Métricas de merge de PR
 (Mesclagem média 8d 17h) (510 fundiu PRs em 30d)

Description

While working on #67075, I found several stale diagnostics that are declared in Diagnostics*.def files, but are never used anywhere in the compiler. I deleted most of the ones I found, but I’m sure there are many more.

We should have a tool that scans lib/ and include/ for uses of diagnostic IDs and flags any that are never actually used. This could perhaps be a test that would fail if there are unused diagnostics.

This might be a good first issue for a new contributor who has reasonably strong Python or Swift skills but doesn’t have any experience with compilers yet.

Guia do colaborador