[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

Florin Iucha via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 2 19:30:13 PST 2021


0x8000-0000 updated this revision to Diff 327655.
0x8000-0000 added a comment.

Add an option "IgnoredVariableNames" that allows filtering out acceptable variable names (similar to the loop counters); also implemented via regex.

Added tests for the IgnoredVariableNames option.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97753/new/

https://reviews.llvm.org/D97753

Files:
  clang-tools-extra/clang-tidy/readability/CMakeLists.txt
  clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
  clang-tools-extra/clang-tidy/readability/VariableLengthCheck.cpp
  clang-tools-extra/clang-tidy/readability/VariableLengthCheck.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/list.rst
  clang-tools-extra/docs/clang-tidy/checks/readability-variable-length.rst
  clang-tools-extra/test/clang-tidy/checkers/readability-variable-length.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97753.327655.patch
Type: text/x-patch
Size: 13549 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210303/4187e1f3/attachment.bin>


More information about the cfe-commits mailing list