Commit Graph

3 Commits

Author SHA1 Message Date
Claude
661fc96fbb feat(tidy): add fairmq-clangd for editor integration
- Add the option BUILD_TIDY_CLANGD (default OFF). It builds
  fairmq-clangd from clangdMain plus the fairmq-* module.
- clangd cannot load plugins, but creates its clang-tidy checks from the
  same registry. Thus the checks run on the AST that clangd builds anyway,
  and editors show their fixes as quick fixes.
- Point clangd to the resource directory of the LLVM installation it was
  built with, unless --resource-dir is given.
- Test each check over LSP with test/tidy/ClangdCheck.py: open the input,
  expect a diagnostic of the check and a quick fix for it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:26:45 +00:00
Claude
622daae350 feat(tidy): build the checks as a clang-tidy plugin
- Add the MODULE library fairmq-tidy-plugin, installed as
  libfairmq-tidy-checks.so. It adds the fairmq-* checks to a stock
  clang-tidy of the same LLVM release via --load.
- Do not link the LLVM libraries into the plugin: the loading clang-tidy
  has them.
- Run every check test also through the plugin, if a clang-tidy of the
  found LLVM installation exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:26:45 +00:00
Claude
e32bee2533 test(tidy): check the fairmq-* checks with FileCheck
- Add test/tidy/RunCheck.cmake, a small check_clang_tidy.py: run one
  check with --fix on a copy of the input, then match the diagnostics
  against CHECK-MESSAGES lines and the fixed file against CHECK-FIXES
  lines. Any other warning or error fails the test.
- Register one test per test/tidy/fairmq-*.cxx file. The inputs use the
  real FairMQ headers via the usage requirements of the FairMQ target.
- Skip the tests with a warning if FileCheck is not found.
- Add the test for fairmq-modernize-nonnamespaced-types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 09:23:27 +00:00