Explorar o código

Enable and fix documentation comment warnings

Enabled `CLANG_WARN_DOCUMENTATION_COMMENTS` in the dynamic framework project and fix the newly generated warnings.
Matt Robinson %!s(int64=8) %!d(string=hai) anos
pai
achega
61d9317fdb
Modificáronse 2 ficheiros con 12 adicións e 0 borrados
  1. 2 0
      Framework/YYModel.xcodeproj/project.pbxproj
  2. 10 0
      YYModel/NSObject+YYModel.h

+ 2 - 0
Framework/YYModel.xcodeproj/project.pbxproj

@@ -405,6 +405,7 @@
 		D9D41A101BD0FABE00CD8EBF /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;
@@ -422,6 +423,7 @@
 		D9D41A111BD0FABE00CD8EBF /* Release */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
 				DEFINES_MODULE = YES;
 				DYLIB_COMPATIBILITY_VERSION = 1;
 				DYLIB_CURRENT_VERSION = 1;

+ 10 - 0
YYModel/NSObject+YYModel.h

@@ -26,6 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
  Sample Code:
     
      ********************** json convertor *********************
+ @code
      @interface YYAuthor : NSObject
      @property (nonatomic, strong) NSString *name;
      @property (nonatomic, assign) NSDate *birthday;
@@ -49,8 +50,10 @@ NS_ASSUME_NONNULL_BEGIN
          NSString *json = [book yy_modelToJSONString];
          // {"author":{"name":"J.K.Rowling","birthday":"1965-07-31T00:00:00+0000"},"name":"Harry Potter","pages":256}
      }
+ @endcode
  
      ********************** Coding/Copying/hash/equal *********************
+ @code
      @interface YYShadow :NSObject <NSCoding, NSCopying>
      @property (nonatomic, copy) NSString *name;
      @property (nonatomic, assign) CGSize size;
@@ -63,6 +66,7 @@ NS_ASSUME_NONNULL_BEGIN
      - (NSUInteger)hash { return [self yy_modelHash]; }
      - (BOOL)isEqual:(id)object { return [self yy_modelIsEqual:object]; }
      @end
+ @endcode
  
  */
 @interface NSObject (YYModel)
@@ -282,6 +286,7 @@ NS_ASSUME_NONNULL_BEGIN
         }
  
     model:
+    @code
         @interface YYBook : NSObject
         @property NSString *name;
         @property NSInteger page;
@@ -297,6 +302,7 @@ NS_ASSUME_NONNULL_BEGIN
                      @"bookID": @[@"id", @"ID", @"book_id"]};
         }
         @end
+     @endcode
  
  @return A custom mapper for properties.
  */
@@ -310,6 +316,7 @@ NS_ASSUME_NONNULL_BEGIN
  object will be add to the array/set/dictionary.
  
   Example:
+  @code
         @class YYShadow, YYBorder, YYAttachment;
  
         @interface YYAttributes
@@ -326,6 +333,7 @@ NS_ASSUME_NONNULL_BEGIN
                      @"attachments" : @"YYAttachment" };
         }
         @end
+  @endcode
  
  @return A class mapper.
  */
@@ -340,6 +348,7 @@ NS_ASSUME_NONNULL_BEGIN
  (both singular and containers via `+modelContainerPropertyGenericClass`).
  
  Example:
+ @code
         @class YYCircle, YYRectangle, YYLine;
  
         @implementation YYShape
@@ -357,6 +366,7 @@ NS_ASSUME_NONNULL_BEGIN
         }
 
         @end
+ @endcode
 
  @param dictionary The json/kv dictionary.