10#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IDENTIFIERLENGTHCHECK_H
11#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_IDENTIFIERLENGTHCHECK_H
13#include "../ClangTidyCheck.h"
14#include "llvm/Support/Regex.h"
27 void check(
const ast_matchers::MatchFinder::MatchResult &Result)
override;
30 const unsigned MinimumVariableNameLength;
31 const unsigned MinimumLoopCounterNameLength;
32 const unsigned MinimumExceptionNameLength;
33 const unsigned MinimumParameterNameLength;
35 std::string IgnoredVariableNamesInput;
36 llvm::Regex IgnoredVariableNames;
38 std::string IgnoredLoopCounterNamesInput;
39 llvm::Regex IgnoredLoopCounterNames;
41 std::string IgnoredExceptionVariableNamesInput;
42 llvm::Regex IgnoredExceptionVariableNames;
44 std::string IgnoredParameterNamesInput;
45 llvm::Regex IgnoredParameterNames;
llvm::SmallString< 256U > Name
Base class for all clang-tidy checks.
Every ClangTidyCheck reports errors through a DiagnosticsEngine provided by this context.
Warns about identifiers names whose length is too short.
void registerMatchers(ast_matchers::MatchFinder *Finder) override
Override this to register AST matchers with Finder.
void storeOptions(ClangTidyOptions::OptionMap &Opts) override
Should store all options supported by this check with their current values or default values for opti...
void check(const ast_matchers::MatchFinder::MatchResult &Result) override
ClangTidyChecks that register ASTMatchers should do the actual work in here.
llvm::StringMap< ClangTidyValue > OptionMap