[Documentation] Style fixes for Objective-C checks documentation to follow C/C++ example.

Release Notes should just repeat first sentence from documentation.

Remove duplicated entry from Release Notes.

llvm-svn: 319479
This commit is contained in:
Eugene Zelenko 2017-11-30 21:42:27 +00:00
parent ff8b874548
commit b026bf1fcc
6 changed files with 29 additions and 32 deletions

View File

@ -57,11 +57,6 @@ The improvements are...
Improvements to clang-tidy
--------------------------
- New `objc-avoid-nserror-init
<http://clang.llvm.org/extra/clang-tidy/checks/objc-avoid-nserror-init.html>`_ check
Add new check to detect the use of [NSError init].
- New module `fuchsia` for Fuchsia style checks.
- New module `objc` for Objective-C style checks.
@ -143,13 +138,13 @@ Improvements to clang-tidy
- New `google-objc-avoid-throwing-exception
<http://clang.llvm.org/extra/clang-tidy/checks/google-objc-avoid-throwing-exception.html>`_ check
Add new check to detect throwing exceptions in Objective-C code, which should be avoided.
Finds uses of throwing exceptions usages in Objective-C files.
- New `google-objc-global-variable-declaration
<http://clang.llvm.org/extra/clang-tidy/checks/google-global-variable-declaration.html>`_ check
Add new check for Objective-C code to ensure global variables follow the
naming convention of 'k[A-Z].*' (for constants) or 'g[A-Z].*' (for variables).
Finds global variable declarations in Objective-C files that do not follow the
pattern of variable names in Google's Objective-C Style Guide.
- New `hicpp-exception-baseclass
<http://clang.llvm.org/extra/clang-tidy/checks/hicpp-exception-baseclass.html>`_ check
@ -166,7 +161,7 @@ Improvements to clang-tidy
- New `objc-avoid-nserror-init
<http://clang.llvm.org/extra/clang-tidy/checks/objc-avoid-nserror-init.html>`_ check
Add new check to detect the use of [NSError init].
Finds improper initialization of ``NSError`` objects.
- New `objc-avoid-spinlock
<http://clang.llvm.org/extra/clang-tidy/checks/objc-avoid-spinlock.html>`_ check
@ -177,15 +172,14 @@ Improvements to clang-tidy
- New `objc-forbidden-subclassing
<http://clang.llvm.org/extra/clang-tidy/checks/objc-forbidden-subclassing.html>`_ check
Ensures Objective-C classes do not subclass any classes which are
not intended to be subclassed. Includes a list of classes from Foundation
and UIKit which are documented as not supporting subclassing.
Finds Objective-C classes which are subclasses of classes which are not
designed to be subclassed.
- New `objc-property-declaration
<http://clang.llvm.org/extra/clang-tidy/checks/objc-property-declaration.html>`_ check
Add new check for Objective-C code to ensure property names follow the naming
convention of Apple's programming guide.
Finds property declarations in Objective-C files that do not follow the
pattern of property names in Apple's programming guide.
- New `readability-static-accessed-through-instance
<http://clang.llvm.org/extra/clang-tidy/checks/readability-static-accessed-through-instance.html>`_ check
@ -245,6 +239,7 @@ Improvements to clang-tidy
<http://clang.llvm.org/extra/clang-tidy/checks/readability-implicit-bool-conversion.html>`_
The check's options were renamed as follows:
- `AllowConditionalIntegerCasts` -> `AllowIntegerConditions`,
- `AllowConditionalPointerCasts` -> `AllowPointerConditions`.

View File

@ -3,7 +3,8 @@
google-objc-avoid-throwing-exception
====================================
This check finds finds uses of throwing exceptions usages in Objective-C files.
Finds uses of throwing exceptions usages in Objective-C files.
For the same reason as the Google C++ style guide, we prefer not throwing
exceptions from Objective-C code.

View File

@ -3,15 +3,15 @@
google-objc-global-variable-declaration
=======================================
Finds global variable declarations in Objective-C files that do not follow the pattern
of variable names in Google's Objective-C Style Guide.
Finds global variable declarations in Objective-C files that do not follow the
pattern of variable names in Google's Objective-C Style Guide.
The corresponding style guide rule:
http://google.github.io/styleguide/objcguide.html#variable-names
All the global variables should follow the pattern of `g[A-Z].*` (variables) or
`k[A-Z].*` (constants). The check will suggest a variable name that follows the pattern
if it can be inferred from the original name.
`k[A-Z].*` (constants). The check will suggest a variable name that follows the
pattern if it can be inferred from the original name.
For code:
@ -43,5 +43,5 @@ However for code that prefixed with non-alphabetical characters like:
static NSString* __anotherString = @"world";
The check will give a warning message but will not be able to suggest a fix. The user
need to fix it on his own.
The check will give a warning message but will not be able to suggest a fix. The
user need to fix it on his own.

View File

@ -3,11 +3,11 @@
objc-avoid-nserror-init
=======================
This check will find out improper initialization of NSError objects.
Finds improper initialization of ``NSError`` objects.
According to Apple developer document, we should always use factory method
``errorWithDomain:code:userInfo:`` to create new NSError objects instead
of ``[NSError alloc] init]``. Otherwise it will lead to a warning message
during runtime.
The corresponding information about NSError creation: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/CreateCustomizeNSError/CreateCustomizeNSError.html
The corresponding information about ``NSError`` creation: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/CreateCustomizeNSError/CreateCustomizeNSError.html

View File

@ -1,19 +1,20 @@
.. title:: clang-tidy - objc-forbidden-subclassing
objc-forbidden-subclassing
==================================
==========================
Finds Objective-C classes which are subclasses of classes which are
not designed to be subclassed.
Finds Objective-C classes which are subclasses of classes which are not designed
to be subclassed.
By default, includes a list of Objective-C classes which
are publicly documented as not supporting subclassing.
By default, includes a list of Objective-C classes which are publicly documented
as not supporting subclassing.
.. note::
Instead of using this check, for code under your control, you should add
``__attribute__((objc_subclassing_restricted))`` before your ``@interface`` declarations
to ensure the compiler prevents others from subclassing your Objective-C classes.
``__attribute__((objc_subclassing_restricted))`` before your ``@interface``
declarations to ensure the compiler prevents others from subclassing your
Objective-C classes.
See https://clang.llvm.org/docs/AttributeReference.html#objc-subclassing-restricted
Options
@ -24,4 +25,4 @@ Options
Semicolon-separated list of names of Objective-C classes which
do not support subclassing.
Defaults to ``ABNewPersonViewController;ABPeoplePickerNavigationController;ABPersonViewController;ABUnknownPersonViewController;NSHashTable;NSMapTable;NSPointerArray;NSPointerFunctions;NSTimer;UIActionSheet;UIAlertView;UIImagePickerController;UITextInputMode;UIWebView``.
Defaults to `ABNewPersonViewController;ABPeoplePickerNavigationController;ABPersonViewController;ABUnknownPersonViewController;NSHashTable;NSMapTable;NSPointerArray;NSPointerFunctions;NSTimer;UIActionSheet;UIAlertView;UIImagePickerController;UITextInputMode;UIWebView`.

View File

@ -40,4 +40,4 @@ Options
Semicolon-separated list of acronyms that can be used as prefix
of property names.
Defaults to ``ASCII;PDF;XML;HTML;URL;RTF;HTTP;TIFF;JPG;PNG;GIF;LZW;ROM;RGB;CMYK;MIDI;FTP``.
Defaults to `ASCII;PDF;XML;HTML;URL;RTF;HTTP;TIFF;JPG;PNG;GIF;LZW;ROM;RGB;CMYK;MIDI;FTP`.