Skip to content

Commit 7abf867

Browse files
author
Umakant Patil
committed
Improve tokenizer, Better way to handle new line chars, upgrade to new version for release.
Change logs are updated
1 parent 7aa93f0 commit 7abf867

File tree

7 files changed

+249
-135
lines changed

7 files changed

+249
-135
lines changed

CHANGE_LOG

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11

2-
v 0.1.2 (Currently in development):-
3-
4-
1. Progress shown while files are scanned is turned off by default.
5-
Need pass short argument "-p" to see progress.
6-
2. Can disable rule for all files.
7-
3. Can disable rule for selected files.
8-
4. Can exclude folders/files/patterns from the folder being scanned.
9-
5. Sample file sample.ignorerules.xml is available for points 2, 3 and 4
10-
7. You can pass ignore rules using long argument "--ignore-rules=<path to ignorerules.xml>"
11-
8. Added this (CHANGE_LOG) file.
2+
v 0.1.2 (Sun, 08 Sept 2013):-
3+
4+
1. Progress shown while files are scanned is turned off by default.
5+
Need pass short argument "-p" to see progress.
6+
2. Can disable rule for all files.
7+
3. Can disable rule for selected files.
8+
4. Can exclude folders/files/patterns from the folder being scanned.
9+
5. Sample file sample.ignorerules.xml is available for points 2, 3 and 4
10+
7. You can pass ignore rules using long argument "--ignore-rules=<path to ignorerules.xml>"
11+
8. Improve tokenizer to handle new line characters in a better way.
12+
9. Folder Tokenizers is renamed to Tokenizer because we have one tokenizer and which
13+
pointed to remove 's' from the folder.
14+
10. TODO and FIXME are also checked inside HTML Comments.
15+
11. Added this (CHANGE_LOG) file.
1216

1317
===========================================================================
1418

SmartyLint/Cli.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function processShortArgument($arg, $pos, $values) {
121121
break;
122122

123123
case 'v':
124-
echo 'SmartyLint version 0.1.0 (alpha) '.PHP_EOL;
124+
echo 'SmartyLint version 0.1.2 (alpha) '.PHP_EOL;
125125
echo 'by Umakant Patil (http://smartylint.com)'.PHP_EOL.PHP_EOL;
126126
exit(0);
127127
break;
@@ -148,7 +148,7 @@ public function processLongArgument($arg, $pos, $values) {
148148
exit(0);
149149
break;
150150
case 'version':
151-
echo 'SmartyLint version 0.1.0 (alpha) '.PHP_EOL;
151+
echo 'SmartyLint version 0.1.2 (alpha) '.PHP_EOL;
152152
echo 'by Umakant Patil (http://smartylint.com)'.PHP_EOL;
153153
exit(0);
154154
break;

SmartyLint/Rules/Commenting/FileCommentRule.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,14 @@ protected function processParams($commentStart) {
172172

173173
$lastParm = (count($params) - 1);
174174
if (substr_count($params[$lastParm]->getWhitespaceAfter(), $this->currentFile->eolChar) !== 2) {
175-
$error = 'Last parameter comment requires a blank newline after it';
175+
$error = 'Last parameter comment has a blank newline after it';
176176
$errorPos = ($params[$lastParm]->getLine() + $commentStart);
177177
$this->currentFile->addError($error, array(0, $errorPos), 'SpacingAfterParams');
178178
}
179179

180180
// Parameters must appear immediately after the comment.
181181
if ($params[0]->getOrder() !== 2) {
182-
$error = 'Parameters must appear immediately after the comment';
182+
$error = 'Parameters must appear immediately after the comment';
183183
$errorPos = ($params[0]->getLine() + $commentStart);
184184
$this->currentFile->addError($error, array(0, $errorPos), 'SpacingBeforeParams');
185185
}

SmartyLint/Rules/Commenting/FixmeRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Rules_Commenting_FixmeRule implements SmartyLint_Rule {
1818
* @return array
1919
*/
2020
public function register() {
21-
return array('COMMENT', 'DOC_COMMENT');
21+
return array('COMMENT', 'DOC_COMMENT', 'HTML_COMMENT');
2222
}
2323

2424
/**

SmartyLint/Rules/Commenting/TodoRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Rules_Commenting_TodoRule implements SmartyLint_Rule {
1818
* @return array
1919
*/
2020
public function register() {
21-
return array('COMMENT', 'DOC_COMMENT');
21+
return array('COMMENT', 'DOC_COMMENT', 'HTML_COMMENT');
2222
}
2323

2424
/**

0 commit comments

Comments
 (0)