File indexing completed on 2026-05-10 08:36:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IDENTIFIERLENGTHCHECK_H
0011 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IDENTIFIERLENGTHCHECK_H
0012
0013 #include "../ClangTidyCheck.h"
0014 #include "llvm/Support/Regex.h"
0015
0016 namespace clang::tidy::readability {
0017
0018
0019
0020
0021
0022 class IdentifierLengthCheck : public ClangTidyCheck {
0023 public:
0024 IdentifierLengthCheck(StringRef Name, ClangTidyContext *Context);
0025 void storeOptions(ClangTidyOptions::OptionMap &Opts) override;
0026 void registerMatchers(ast_matchers::MatchFinder *Finder) override;
0027 void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
0028
0029 private:
0030 const unsigned MinimumVariableNameLength;
0031 const unsigned MinimumLoopCounterNameLength;
0032 const unsigned MinimumExceptionNameLength;
0033 const unsigned MinimumParameterNameLength;
0034
0035 std::string IgnoredVariableNamesInput;
0036 llvm::Regex IgnoredVariableNames;
0037
0038 std::string IgnoredLoopCounterNamesInput;
0039 llvm::Regex IgnoredLoopCounterNames;
0040
0041 std::string IgnoredExceptionVariableNamesInput;
0042 llvm::Regex IgnoredExceptionVariableNames;
0043
0044 std::string IgnoredParameterNamesInput;
0045 llvm::Regex IgnoredParameterNames;
0046 };
0047
0048 }
0049
0050 #endif