From 319992dbc1f3e6c0dacbb94a7dbe6a8316d0af4d Mon Sep 17 00:00:00 2001 From: Sergey Abramchuk Date: Wed, 10 Jan 2018 13:26:10 +0300 Subject: [PATCH] Add missing words indicating good examples --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 46585ae..12b0290 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -130,12 +130,16 @@ Asterisks indicating a type is a pointer **MUST** be "attached to" the argument When it comes to the nullability specifiers, the specifiers (`nonnull`, `nullable`, `null_unspecified`) **SHOULD** be placed immediately after an open parenthesis, as long as the type is a simple object or block pointer: ``` +// GOOD: + - (void)doSomethingWithString:(nonnull NSString *)theString; ``` You can mark certain regions of your Objective-C header files as audited for `nullability` using `NS_ASSUME_NONNULL_BEGIN` and `NS_ASSUME_NONNULL_END`. Within these regions, any simple pointer type will be assumed to be `nonnull`. ``` +// GOOD: + NS_ASSUME_NONNULL_BEGIN @interface AAPLList : NSObject @@ -379,6 +383,8 @@ The method name should read like a sentence if possible, meaning you should choo Use prepositions and conjunctions like “with”, “from”, and “to” in the second and later parameter names only where necessary to clarify the meaning or behavior of the method. ``` +// GOOD: + - (void)addTarget:(id)target action:(SEL)action; - (CGPoint)convertPoint:(CGPoint)point fromView:(UIView *)view; - (void)replaceCharactersInRange:(NSRange)aRange