#Formating options for .h / .m
##File
###Rules
- No
EmptyLine
at begining of file - No
EmptyLine
at 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
EmptyLine
or anotherImportLine
- Must start with
#import
- Must be followed by
EmptyLine
or anotherImportLine
##DefineLine (optional)
###Identification
- Starts with 0+ whitespaces then #define
###Rules
- Must be preceded by
EmptyLine
or anotherDefineLine
- Must start with
#define
- Must be followed by
EmptyLine
or anotherDefineLine
##ClassCommentLine
###Identification
- Starts with 0+ whitespaces then
//
- Followed by a
ClassCommentLine
or anInterfaceLine
###Rules
- Must be preceded by
ClassCommentLine
ofEmptyLine
- Must start with
//
- Must be followed by
ClassCommentLine
ofInterfaceLine
##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
EmptyLine
orCommentLine
- Must start with
@public
or@private
##EndBraceTopLevel
###Identification
- Starts with
}
(no space in front)
###Rules
- Must be preceded by
EmptyLine
orCommentLine
- Must be followed by
EmptyLine
##PropertyLine
###Identification
- contains
@property
###Rules
- Must be preceded by
EmptyLine
orCommentLine
orPropertyLine
- Must end with
;
(no space) - Must be followed by
EmptyLine
orPropertyLine
##MethodCommentLine
###Identification
- Starts with
//
(no space before) - Followed by 0 or more
MethodCommentLine
then anMethodDeclarationLine
###Rules
- Must be preceded by
MethodCommentLine
ofEmptyLine
- Must be followed by
MethodCommentLine
ofMethodDeclarationLine
##MethodDeclarationLine
###Identification
- Starts with 0+ whitespaces then
-
or+
- Does not contain {
- Is not followed by 0+
EmptyLine
then 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
PartialDeclarationLine
orMethodDeclarationLine
- 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
EmptyLine
orCommentLine
##TODO
- Write implementation (.m) file rules