feat(tidy): add fairmq-modernize-run-device

- Migrate a device main file from <runFairMQDevice.h> to
  <fairmq/runDevice.h>: the include, the FairMQDevicePtr return type,
  the const ProgOptions& parameter and 'return new T(...)', which becomes
  'return std::make_unique<T>(...)'.
- Fix all of it or nothing: if a return statement of getDevice() is not
  a plain new expression, only report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-11-09 22:57:09 +00:00
parent 67fd7f2305
commit 871e7e54cf
7 changed files with 295 additions and 2 deletions

View File

@@ -45,6 +45,8 @@ add_library(fairmq-tidy-module OBJECT
PartsApiCheck.h
ProgOptionsAccessorsCheck.cxx
ProgOptionsAccessorsCheck.h
RunDeviceCheck.cxx
RunDeviceCheck.h
)
target_compile_features(fairmq-tidy-module PUBLIC cxx_std_17)
target_include_directories(fairmq-tidy-module