File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ List of TODO's:-
3
+
4
+ 1. Add following rules
5
+ * Don't use TAB. Use 4 spaces.
6
+ * Use unix line endings (\\n).
7
+ * Use periods in Smarty array variables ({$user.id}). Don't use brackets ({$user['id']})
8
+
9
+ 2. Improve Smarty Tokenizer code.
10
+ 3. Ability to disable any rule completely.
11
+ 4. Ability to disable any rule for selected file.
12
+ 5. Can exclude any folder/path.
13
+
14
+
15
+ Rough plan for points 2:-
16
+
17
+ It should tokenize tags just the way like it tokenzis comments, html comment, spaces, new line chars.
18
+ It should tokenize smarty tags like {if}, {else}..etc
19
+ And gradually add more rules like empty if, empty else, empty foreach are not allowed.
20
+
21
+
22
+
23
+ Rough plan for points 3, 4 and 5:-
24
+
25
+ User can pass any.xml to SmartyLint like the way we pass --files=
26
+ e.g. php smartyl --files=/home/user/smarty_files --rules=<path to>any.xml
27
+
28
+ any.xml will have format something like
29
+
30
+ <ruleset>
31
+ <exclude path="*/test/*" />
32
+ <exclude rule="Files.EndFileNewline.TooMany" />
33
+ <exclude rule="Commenting.FileComment.ParameterNamesNotAligned">
34
+ <file>smarty_files/users/xyz.tpl</file>
35
+ <file>smarty_files/test/lmno.tpl</file>
36
+ <exclude>
37
+ </ruleset>
You can’t perform that action at this time.
0 commit comments