Revise the google-objc-global-variable-declaration check to match the style guide.
authorStephane Moore <mog@google.com>
Wed, 29 May 2019 01:36:23 +0000 (01:36 +0000)
committerStephane Moore <mog@google.com>
Wed, 29 May 2019 01:36:23 +0000 (01:36 +0000)
commit12e3726fadb0b2a4d8aeed0a2817b5159f9d029d
treee74dd7f6bcf979dc80bc637ca44e58dd7969bd3f
parent860736cc3cfc60a15012d754be41aa389898a1e6
Revise the google-objc-global-variable-declaration check to match the style guide.

Summary:
Revise the google-objc-global-variable-declaration check to match the style guide.

This commit updates the check as follows:
(1) Do not emit fixes for extern global constants.
(2) Allow the second character of prefixes for constants to be numeric (the new guideline is that global constants should generally be named with a prefix that begins with a capital letter followed by one or more capital letters or numbers).

https://google.github.io/styleguide/objcguide.html#prefixes

Contributed by yaqiji.

Reviewers: Wizard, benhamilton, stephanemoore

Reviewed By: benhamilton, stephanemoore

Subscribers: mgorny, cfe-commits, yaqiji

Tags: #clang

Differential Revision: https://reviews.llvm.org/D62045

llvm-svn: 361907
clang-tools-extra/clang-tidy/google/GlobalVariableDeclarationCheck.cpp
clang-tools-extra/test/clang-tidy/google-objc-global-variable-declaration.m