mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2026-11-26 05:31:36 +00:00
feat(tidy): add fairmq-modernize-deprecated-headers
- Report includes of the ten deprecated headers, e.g. <FairMQDevice.h> or <fairmq/FairMQDevice.h>, and replace them with the successor, e.g. <fairmq/Device.h>. Today these headers only emit a #pragma warning. - Keep the quote style of the include. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
34
fairmq/tidy/DeprecatedHeadersCheck.h
Normal file
34
fairmq/tidy/DeprecatedHeadersCheck.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/********************************************************************************
|
||||
* Copyright (C) 2026 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||
* *
|
||||
* This software is distributed under the terms of the *
|
||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||
* copied verbatim in the file "LICENSE" *
|
||||
********************************************************************************/
|
||||
|
||||
#ifndef FAIR_MQ_TIDY_DEPRECATEDHEADERSCHECK_H
|
||||
#define FAIR_MQ_TIDY_DEPRECATEDHEADERSCHECK_H
|
||||
|
||||
#include <clang-tidy/ClangTidyCheck.h>
|
||||
|
||||
namespace fair::mq::tidy {
|
||||
|
||||
/// Finds includes of the deprecated top-level headers (e.g. `<FairMQDevice.h>`)
|
||||
/// and replaces them with their successor (e.g. `<fairmq/Device.h>`).
|
||||
class DeprecatedHeadersCheck : public clang::tidy::ClangTidyCheck
|
||||
{
|
||||
public:
|
||||
using ClangTidyCheck::ClangTidyCheck;
|
||||
|
||||
bool isLanguageVersionSupported(clang::LangOptions const& opts) const override
|
||||
{
|
||||
return opts.CPlusPlus;
|
||||
}
|
||||
void registerPPCallbacks(clang::SourceManager const& sm,
|
||||
clang::Preprocessor* pp,
|
||||
clang::Preprocessor* moduleExpanderPP) override;
|
||||
};
|
||||
|
||||
} // namespace fair::mq::tidy
|
||||
|
||||
#endif /* FAIR_MQ_TIDY_DEPRECATEDHEADERSCHECK_H */
|
||||
Reference in New Issue
Block a user