#Formating options for .h / .m
##File
###Rules
- No
EmptyLineat begining of file - No
EmptyLineat end of file - Must start with
FileCommentBlock - Must end with
@end
##EmptyLine
###Identification
- Contains only space, tabs and newline
##FileCommentBlock
###Rules
- First line must be
// - Second line must be
// ${filename} - Third line must be
// ${projectname} - Fourth line must be
// - Fifth line must be
// Created by ${author} on ${date}. - Sixth line must be
// Copyright ${year} ${company}. All rights reserved. - Seventh line must be
// - Other lines must be
// ${anything} - Last line must be
// - Must be followed by an
EmptyLine
##ImportLine (optional)
###Identification
- Starts with 0+ whitespaces then #import
###Rules
- Must be preceded by
EmptyLineor anotherImportLine - Must start with
#import - Must be followed by
EmptyLineor anotherImportLine
##DefineLine (optional)
###Identification
- Starts with 0+ whitespaces then #define
###Rules
- Must be preceded by
EmptyLineor anotherDefineLine - Must start with
#define - Must be followed by
EmptyLineor anotherDefineLine
##ClassCommentLine
###Identification
- Starts with 0+ whitespaces then
// - Followed by a
ClassCommentLineor anInterfaceLine
###Rules
- Must be preceded by
ClassCommentLineofEmptyLine - Must start with
// - Must be followed by
ClassCommentLineofInterfaceLine
##InterfaceLines
###Identification
- Starts with 0+ whitespaces then
@interface
- Must end with
{ - Must be preceded by
ClassCommentLine - Must start with
@interface - if contains
:then must have:(space+colon+space) - if contains
<then must have<(no space around <) and>(no space around >) - Must end with
{(space+brace) - Must be followed by
EmptyLine
##CommentLine
###Identification
- Starts with 0+ whitespaces then
//
##ScopeLine
###Identification
- Contains @private or @public
###Rules
- Must be preceded by
EmptyLineorCommentLine - Must start with
@publicor@private
##EndBraceTopLevel
###Identification
- Starts with
}(no space in front)
###Rules
- Must be preceded by
EmptyLineorCommentLine - Must be followed by
EmptyLine
##PropertyLine
###Identification
- contains
@property
###Rules
- Must be preceded by
EmptyLineorCommentLineorPropertyLine - Must end with
;(no space) - Must be followed by
EmptyLineorPropertyLine
##MethodCommentLine
###Identification
- Starts with
//(no space before) - Followed by 0 or more
MethodCommentLinethen anMethodDeclarationLine
###Rules
- Must be preceded by
MethodCommentLineofEmptyLine - Must be followed by
MethodCommentLineofMethodDeclarationLine
##MethodDeclarationLine
###Identification
- Starts with 0+ whitespaces then
-or+ - Does not contain {
- Is not followed by 0+
EmptyLinethen a line that starts with{
###Rules
- Must be preceded by
MethodCommentLine - Must have no space before sign
- Must have a space after sign
- If contains
:then must have no space before or after - If contains
(then must have no space before or after - If contains
)then must have no space before or after - If contains
;then ** Must have no space before;** Must be followed byEmptyLine - If doesn't contain
;** Must contain:** Must be followed byPartialDeclarationLine
##PartialDeclarationLine
###Identification
- Preceded by
PartialDeclarationLineorMethodDeclarationLine - Starts with 0+ whitespaces then letters
- Contains
:,(and)
###Rules
- Must not have spaces around
::,(and) - If contains
;** Must have no space before;** Must be followed byEmptyLine - If doesn't contain
;** Must be followed byPartialDeclarationLine
##EndLine
###Identification
- Contains @end
###Rules
- Must be preceded by
EmptyLineorCommentLine
##TODO
- Write implementation (.m) file rules