Skip to content
Browse files

ocstyle also checks for missing docs - add this to the example

  • Loading branch information...
1 parent 4aa3be3 commit a1c79396b9f833c0973d8ee45efa3406c63a20ab @robbywalker robbywalker committed Jun 29, 2013
Showing with 29 additions and 8 deletions.
  1. +29 −8 README.md
View
37 README.md
@@ -14,23 +14,44 @@ pip install ocstyle
If you have a file called `test.m` like this:
```objc
+@implementation SomeClass
+
+(void) someMessage:(NSString*)subdomain {
NSString *ShouldStartLowerCase;
// ...
}
+
+@end
+```
+
+and `test.h` like this:
+
```
+@interface SomeClass
-You can check style in it like this:
++ (void)someMessage:(NSString*)subdomain;
+@property NSInteger value;
+
+@end
```
-$ ocstyle test.m
+
+You can check style like this:
+
+```
+$ ocstyle test.*
+test.h
+ERROR: 0:-97 [0] - ExpectedInterfaceDocInHeader - Interface requires /** documentation */
+ERROR: 3:30 [51] - MissingSpace - Expected 1, got 0
+ERROR: 5:1 [65] - ExpectedPropertyDocInHeader - Property requires /** documentation */
+
test.m
-ERROR: 1:1 [1] - MissingSpace - Expected 1, got 0
-ERROR: 1:8 [8] - ExtraSpace - Did not expect ' ' here
-ERROR: 1:29 [29] - MissingSpace - Expected 1, got 0
-ERROR: 1:41 [41] - MissingNewline - Should have newline after ;
-ERROR: 1:41 [41] - MissingSemicolon - Expected a semicolon
-ERROR: 2:35 [77] - BadLocalVariableName - Local variable must start with a lower case letter
+ERROR: 3:2 [28] - MissingSpace - Expected 1, got 0
+ERROR: 3:9 [35] - ExtraSpace - Did not expect ' ' here
+ERROR: 3:30 [56] - MissingSpace - Expected 1, got 0
+ERROR: 3:42 [68] - MissingNewline - Should have newline after ;
+ERROR: 3:42 [68] - MissingSemicolon - Expected a semicolon
+ERROR: 4:35 [104] - BadLocalVariableName - Local variable must start with a lower case letter```
```
# Goal

0 comments on commit a1c7939

Please sign in to comment.
Something went wrong with that request. Please try again.