[PATCH] D90282: [clang-tidy] Support IgnoredRegexp configuration to selectively suppress identifier naming checks

2020-11-25 Thread Shane via Phabricator via cfe-commits
smhc added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-identifier-naming.rst:683 +.. option:: EnumConstantIgnoredRegexp + Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D9028

[PATCH] D90282: [clang-tidy] Support IgnoredRegexp configuration to selectively suppress identifier naming checks

2020-11-24 Thread Shane via Phabricator via cfe-commits
smhc added a comment. There's a build failure from this merge, looks like a typo: -.. option:: EnumConstantIgnoredRegexp +.. option:: EnumIgnoredRegexp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 _

[PATCH] D91908: [clang-tidy] Use compiled regex for AllowedRegexp in macro usage check

2020-11-23 Thread Shane via Phabricator via cfe-commits
smhc added a comment. Yes all looks good, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91908/new/ https://reviews.llvm.org/D91908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D90282: [clang-tidy] Support IgnoredRegexp configuration to selectively suppress identifier naming checks

2020-11-23 Thread Shane via Phabricator via cfe-commits
smhc added a comment. Yes I thought the same wrt the doco. There is also a hungarian notation config option in the works which does the same thing. I nearly reworked it but figured it would be best done under a separate patch It does have the potential to be less searchable through google for s

[PATCH] D90282: [clang-tidy] Support IgnoredRegexp configuration to selectively suppress identifier naming checks

2020-11-23 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 307177. smhc marked an inline comment as done. smhc added a comment. Removed unnecessary diff CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 Files: clang-tools-extra/clang-tidy/readability/IdentifierNamingCh

[PATCH] D90282: [clang-tidy] Support IgnoredRegexp configuration to selectively suppress identifier naming checks

2020-11-23 Thread Shane via Phabricator via cfe-commits
smhc added a comment. Thanks for the reviews everyone, I have updated the title and summary. Unfortunately I don't have push access to llvm - could someone help to push this please? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 __

[PATCH] D90282: [clang-tidy] Support IgnoredRegexp configuration to selectively suppress identifier naming checks

2020-11-23 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 307157. smhc marked an inline comment as done. smhc added a comment. Fixed uk/us spelling difference as suggested CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 Files: clang-tools-extra/clang-tidy/readabilit

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-22 Thread Shane via Phabricator via cfe-commits
smhc added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:127-128 getFileStyleFromOptions(const ClangTidyCheck::OptionsView &Options) { SmallVector, 0> Styles( SK_Count); SmallString<64> StyleString;

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-22 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 306942. smhc marked 4 inline comments as done. smhc added a comment. Updated after review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 Files: clang-tools-extra/clang-tidy/readability/IdentifierNa

[PATCH] D91908: [clang-tidy] Use compiled regex for AllowedRegexp in macro usage check

2020-11-22 Thread Shane via Phabricator via cfe-commits
smhc added a comment. Thank you - I don't have commit access so am unable to merge it myself. The clang-tidy tests are passing fine. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91908/new/ https://reviews.llvm.org/D91908 ___ cfe-commits mai

[PATCH] D91908: [clang-tidy] Use compiled regex for AllowedRegexp in macro usage check

2020-11-21 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 306870. smhc added a comment. Thanks - I had it like that originally but was not sure how often MacroUsageCallbacks would be instantiated or whether there was a many-to-one relationship. I've now modified it to create and maintain the regex object as a member

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-20 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 306815. smhc added a comment. Updated after review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 Files: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp clang-tools-extra/clang

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-20 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 306687. smhc added a comment. removed notes on short length threshold CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 Files: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp clang-tools-ex

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-20 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 306686. smhc added a comment. Updated diff to use 'IgnoredRegexp' I see that a regexp has been used elsewhere for some other checks (macro usage, AllowedRegexp). (as a side note, I see that AllowedRegexp string is getting compiled on every match rather than pr

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-19 Thread Shane via Phabricator via cfe-commits
smhc added a comment. Regexes may be a bit of a slippery slope as any identifier scheme could be represented as a regex (casing, prefix, suffix etc) but it's not practical to provide a fix or suggestion with a regex. For example with a 'ShortThreshold' a fix could offer to change the casing/xff

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-15 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 305395. smhc added a comment. Re-based to llvm master and re-diffed. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 Files: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp clang-tools-ext

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-14 Thread Shane via Phabricator via cfe-commits
smhc added a comment. I updated it to use XXShortSizeThreshold. But I was thinking.. perhaps a more generic approach could be "xxIgnoreRegex", this would allow you to do things such as : VariableIgnoreRegex: ([a-z]{2}|index) ClassIgnoreRegex: (Special_CASE|CommonOther.*) etc. it would be more

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-14 Thread Shane via Phabricator via cfe-commits
smhc updated this revision to Diff 305341. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90282/new/ https://reviews.llvm.org/D90282 Files: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h clang-tools

[PATCH] D90282: [clang-tidy] Add IgnoreShortNames config to identifier naming checks

2020-11-12 Thread Shane via Phabricator via cfe-commits
smhc added a comment. In D90282#2391360 , @aaron.ballman wrote: > In D90282#2391005 , @njames93 wrote: > >> Should this be a NamingStyle option instead. >> `{key: readability-identifier-naming.ParameterShortSizeThr