-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add doc about rules and standard (#166)
- Loading branch information
1 parent
3639e64
commit 9400431
Showing
16 changed files
with
57 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Rules & Standard | ||
|
||
## Rules | ||
|
||
- **BlockNameSpacingRule**: ensures there is one space before and after block names. | ||
- **DelimiterSpacingRule**: ensures there is one space before '}}', '%}' and '#}', and after '{{', '{%', '{#'. | ||
- **DirectoryNameRule**: ensures directory name is snake_case (configurable). | ||
- **FileNameRule**: ensures file name is snake_case (configurable). | ||
- **OperatorNameSpacingRule**: ensures there is no consecutive spaces inside operator names. | ||
- **OperatorSpacingRule**: ensures there is one space before and after an operator except for '..'. | ||
- **PunctuationSpacingRule**: ensures there is no space before and after a punctuation except for ':' and ','. | ||
- **TrailingCommaSingleLineRule**: ensures that single-line arrays, objects and argument lists do not have a trailing comma. | ||
- **BlankEOFRule**: ensures that files ends with one blank line. | ||
- **EmptyLinesRule**: ensures that 2 empty lines do not follow each other. | ||
- **IndentRule**: ensures that files are not indented with tabs. | ||
- **TrailingSpaceRule**: ensures that files have no trailing spaces. | ||
|
||
## Standards | ||
|
||
**Twig**: | ||
- DelimiterSpacingRule | ||
- OperatorNameSpacingRule | ||
- OperatorSpacingRule | ||
- PunctuationSpacingRule | ||
|
||
**TwigCsFixer**: | ||
- Twig | ||
- BlankEOFRule | ||
- BlockNameSpacingRule | ||
- EmptyLinesRule | ||
- IndentRule | ||
- TrailingCommaSingleLineRule | ||
- TrailingSpaceRule | ||
|
||
**Symfony**: | ||
- Twig | ||
- DirectoryNameRule | ||
- FileNameRule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters