feat(tidy): add fairmq-modernize-deprecated-functions

- Replace Device::GetStateName() and Device::GetTransitionName() with
  the free functions fair::mq::GetStateName() and GetTransitionName().
- Replace Socket::GetConstant() of the zeromq and shmem transports with
  fair::mq::zmq::getConstant() and include <fairmq/zeromq/Common.h>.
- Report Socket::Close() without a fix: the socket closes when it is
  destroyed, so the call must go away, not be renamed.
- Skip the fix if the object expression has side effects.

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 75fd9622e2
commit 3975017183
6 changed files with 225 additions and 0 deletions

View File

@@ -34,6 +34,8 @@ endif()
add_library(fairmq-tidy-module OBJECT
ChannelsAccessCheck.cxx
ChannelsAccessCheck.h
DeprecatedFunctionsCheck.cxx
DeprecatedFunctionsCheck.h
DeprecatedHeadersCheck.cxx
DeprecatedHeadersCheck.h
Module.cxx