Skip to content

Commit

Permalink
ocstyle also checks for missing docs - add this to the example
Browse files Browse the repository at this point in the history
  • Loading branch information
robbywalker committed Jun 30, 2013
1 parent 4aa3be3 commit a1c7939
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1c7939

Please sign in to comment.