[PATCH] D127446: [clang-tidy] Add `-verify-config` command line argument

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 9 14:49:24 PDT 2022


njames93 created this revision.
njames93 added reviewers: alexfh, aaron.ballman.
Herald added subscribers: carlosgalvezp, arphaman, xazax.hun.
Herald added a project: All.
njames93 requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Adds a `-verify-config` command line argument, that when specified will verify the Checks and CheckOptions fields in the config files:

- A warning will be raised for any check that glob that doesn't correspond to a registered check, a suggestion will also be emitted for close misses.
- A warning will be raised for any check glob that doesn't match any registered check.
- A warning will be raised for any CheckOption that isn't read by any registered check, a suggestion will also be emitted for close misses.

This can be useful if debuging why a certain check isn't enabled, or the options are being handled as you expect them to be.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127446

Files:
  clang-tools-extra/clang-tidy/ClangTidy.cpp
  clang-tools-extra/clang-tidy/ClangTidy.h
  clang-tools-extra/clang-tidy/ClangTidyCheck.cpp
  clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h
  clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/index.rst
  clang-tools-extra/test/clang-tidy/infrastructure/verify-config.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127446.435692.patch
Type: text/x-patch
Size: 13797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220609/04171f11/attachment.bin>


More information about the cfe-commits mailing list