summaryrefslogtreecommitdiff
path: root/clang-tools-extra/docs
diff options
context:
space:
mode:
authorStephane Moore <mog@google.com>2018-12-05 03:44:03 +0000
committerStephane Moore <mog@google.com>2018-12-05 03:44:03 +0000
commit5e92b1b6c6701683b546f7ef7215aa8853bb8243 (patch)
tree8ae0756cd2acc8eee81b17f41984d7ae0e2ce320 /clang-tools-extra/docs
parenta459e44d548c45d6f45957ca1a3c65c0dfd8d704 (diff)
[clang-tidy/checks] Update objc-property-declaration check to allow arbitrary acronyms and initialisms 🔧
Summary: §1 Description This changes the objc-property-declaration check to allow arbitrary acronyms and initialisms instead of using whitelisted acronyms. In Objective-C it is relatively common to use project prefixes in property names for the purposes of disambiguation. For example, the CIColor¹ and CGColor² properties on UIColor both represent symbol prefixes being used in proeprty names outside of Apple's accepted acronyms³. The union of Apple's accepted acronyms and all symbol prefixes that might be used for disambiguation in property declarations effectively allows for any arbitrary sequence of capital alphanumeric characters to be acceptable in property declarations. This change updates the check accordingly. The test variants with custom configurations are deleted as part of this change because their configurations no longer impact behavior. The acronym configurations are currently preserved for backwards compatibility of check configuration. [1] https://developer.apple.com/documentation/uikit/uicolor/1621951-cicolor?language=objc [2] https://developer.apple.com/documentation/uikit/uicolor/1621954-cgcolor?language=objc [3] https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/CodingGuidelines/Articles/APIAbbreviations.html#//apple_ref/doc/uid/20001285-BCIHCGAE §2 Test Notes Changes verified by: • Running clang-tidy unit tests. • Used check_clang_tidy.py to verify expected output of processing objc-property-declaration.m Reviewers: benhamilton, Wizard Reviewed By: benhamilton Subscribers: jfb, cfe-commits Differential Revision: https://reviews.llvm.org/D51832
Diffstat (limited to 'clang-tools-extra/docs')
-rw-r--r--clang-tools-extra/docs/ReleaseNotes.rst4
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/objc-property-declaration.rst19
2 files changed, 6 insertions, 17 deletions
diff --git a/clang-tools-extra/docs/ReleaseNotes.rst b/clang-tools-extra/docs/ReleaseNotes.rst
index 19079686059..cec9645fe65 100644
--- a/clang-tools-extra/docs/ReleaseNotes.rst
+++ b/clang-tools-extra/docs/ReleaseNotes.rst
@@ -231,6 +231,10 @@ Improvements to clang-tidy
- floating point - integer narrowing conversions,
- constants with narrowing conversions (even in ternary operator).
+- The :doc:`objc-property-declaration
+ <clang-tidy/checks/objc-property-declaration>` check now ignores the
+ `Acronyms` and `IncludeDefaultAcronyms` options.
+
Improvements to include-fixer
-----------------------------
diff --git a/clang-tools-extra/docs/clang-tidy/checks/objc-property-declaration.rst b/clang-tools-extra/docs/clang-tidy/checks/objc-property-declaration.rst
index b372ccd1d0a..49df5102096 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/objc-property-declaration.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/objc-property-declaration.rst
@@ -47,23 +47,8 @@ Options
.. option:: Acronyms
- Semicolon-separated list of custom acronyms that can be used as a prefix
- or a suffix of property names.
-
- By default, appends to the list of default acronyms (
- ``IncludeDefaultAcronyms`` set to ``1``).
- If ``IncludeDefaultAcronyms`` is set to ``0``, instead replaces the
- default list of acronyms.
+ This option is deprecated and ignored.
.. option:: IncludeDefaultAcronyms
- Integer value (defaults to ``1``) to control whether the default
- acronyms are included in the list of acronyms.
-
- If set to ``1``, the value in ``Acronyms`` is appended to the
- default list of acronyms:
-
- ``[2-9]G;ACL;API;APN;APNS;AR;ARGB;ASCII;AV;BGRA;CA;CDN;CF;CG;CI;CRC;CV;CMYK;DNS;FPS;FTP;GIF;GL;GPS;GUID;HD;HDR;HMAC;HTML;HTTP;HTTPS;HUD;ID;JPG;JS;JSON;LAN;LZW;LTR;MAC;MD;MDNS;MIDI;NS;OS;P2P;PDF;PIN;PNG;POI;PSTN;PTR;QA;QOS;RGB;RGBA;RGBX;RIPEMD;ROM;RPC;RTF;RTL;SC;SDK;SHA;SQL;SSO;TCP;TIFF;TOS;TTS;UI;URI;URL;UUID;VC;VO;VOIP;VPN;VR;W;WAN;X;XML;Y;Z``.
-
- If set to ``0``, the value in ``Acronyms`` replaces the default list
- of acronyms.
+ This option is deprecated and ignored.