swiftlang/swift

We should have a tool that finds unused diagnostic IDs

Open

#67,306 创建于 2023年7月14日

在 GitHub 查看
 (8 评论) (0 反应) (1 负责人)Swift (10,719 fork)batch import
QoIcompilerdevelopment toolsfeaturegood first issueutils

仓库指标

Star
 (69,989 star)
PR 合并指标
 (平均合并 8天 17小时) (30 天内合并 510 个 PR)

描述

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.

贡献者指南