Skip to content

Commit 388ad2d

Browse files
author
Nicholas C. Zakas
committed
Fixed regression in output format for CLI (fixes #87)
1 parent ff17048 commit 388ad2d

File tree

16 files changed

+92
-29
lines changed

16 files changed

+92
-29
lines changed

CHANGELOG

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
Next (not yet released)
22
* n/a
33

4+
June 25, 2011 - v0.3.2
5+
6+
* Fixed regression in output format for CLI (fixes #87)
7+
8+
June 25, 2011 - v0.3.1
9+
10+
* Fixed EOL issue for Node.js CLI
11+
412
June 25, 2011 - v0.3.0
513

614
* Rhino and Node CLIs both exit with code 1 when there are errors (pull #72)

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<project name="csslint" default="all">
22

33
<!-- version number -->
4-
<property name="csslint.version" value="0.3.1" />
4+
<property name="csslint.version" value="0.3.2" />
55

66
<!-- the directories containing the source files -->
77
<property name="src.dir" value="./src" />

build/csslint-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 26-June-2011 10:55:08 */
24+
/* Build time: 26-June-2011 03:42:58 */
2525
/*!
2626
Parser-Lib
2727
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.

build/csslint-rhino.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 26-June-2011 10:55:08 */
24+
/* Build time: 26-June-2011 03:42:58 */
2525
var CSSLint = (function(){
2626
/*!
2727
Parser-Lib
@@ -10588,6 +10588,17 @@ var processFile = function(filename, options) {
1058810588
var reportMessages = function(messages, warnings, errors, filename) {
1058910589
print("\n\ncsslint: There are " + errors.length + " errors and " + warnings.length + " warnings in " + filename + ".");
1059010590

10591+
var pos = filename.lastIndexOf("/"),
10592+
shortFilename = filename;
10593+
10594+
if (pos == -1){
10595+
pos = filename.lastIndexOf("\\");
10596+
}
10597+
if (pos > -1){
10598+
shortFilename = filename.substring(pos+1);
10599+
}
10600+
10601+
1059110602
//rollups at the bottom
1059210603
messages.sort(function (a, b){
1059310604
if (a.rollup && !b.rollup){
@@ -10600,7 +10611,7 @@ var reportMessages = function(messages, warnings, errors, filename) {
1060010611
});
1060110612

1060210613
messages.forEach(function (message, i) {
10603-
print("\n" + filename);
10614+
print("\n" + shortFilename + ":");
1060410615
if (message.rollup) {
1060510616
print("" + (i+1) + ": " + message.type);
1060610617
print(message.message);

build/csslint-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 26-June-2011 10:55:08 */
24+
/* Build time: 26-June-2011 03:42:58 */
2525
/*!
2626
Parser-Lib
2727
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.

build/csslint.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 26-June-2011 10:55:08 */
24+
/* Build time: 26-June-2011 03:42:58 */
2525
var CSSLint = (function(){
2626
/*!
2727
Parser-Lib

build/npm/cli.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env node
2-
/* Build time: 26-June-2011 10:55:08 */
2+
/* Build time: 26-June-2011 03:42:58 */
33
//print for rhino and nodejs
44
if(typeof print == "undefined") {
55
var print = console.log;
@@ -65,6 +65,17 @@ var processFile = function(filename, options) {
6565
var reportMessages = function(messages, warnings, errors, filename) {
6666
print("\n\ncsslint: There are " + errors.length + " errors and " + warnings.length + " warnings in " + filename + ".");
6767

68+
var pos = filename.lastIndexOf("/"),
69+
shortFilename = filename;
70+
71+
if (pos == -1){
72+
pos = filename.lastIndexOf("\\");
73+
}
74+
if (pos > -1){
75+
shortFilename = filename.substring(pos+1);
76+
}
77+
78+
6879
//rollups at the bottom
6980
messages.sort(function (a, b){
7081
if (a.rollup && !b.rollup){
@@ -77,7 +88,7 @@ var reportMessages = function(messages, warnings, errors, filename) {
7788
});
7889

7990
messages.forEach(function (message, i) {
80-
print("\n" + filename);
91+
print("\n" + shortFilename + ":");
8192
if (message.rollup) {
8293
print("" + (i+1) + ": " + message.type);
8394
print(message.message);

build/npm/lib/csslint-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 26-June-2011 10:55:08 */
24+
/* Build time: 26-June-2011 03:42:58 */
2525
/*!
2626
Parser-Lib
2727
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.

release/csslint-node.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 26-June-2011 10:55:08 */
24+
/* Build time: 26-June-2011 03:42:58 */
2525
/*!
2626
Parser-Lib
2727
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
@@ -4756,7 +4756,7 @@ Tokens :Tokens
47564756
*/
47574757

47584758
var YUITest = {
4759-
version: "0.3.1"
4759+
version: "0.3.2"
47604760
};
47614761

47624762

@@ -9317,7 +9317,7 @@ var CSSLint = (function(){
93179317
var rules = [],
93189318
api = new parserlib.util.EventTarget();
93199319

9320-
api.version = "0.3.1";
9320+
api.version = "0.3.2";
93219321

93229322
//-------------------------------------------------------------------------
93239323
// Rule Management

release/csslint-rhino.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Build time: 26-June-2011 10:55:08 */
24+
/* Build time: 26-June-2011 03:42:58 */
2525
var CSSLint = (function(){
2626
/*!
2727
Parser-Lib
@@ -4757,7 +4757,7 @@ Tokens :Tokens
47574757
*/
47584758

47594759
var YUITest = {
4760-
version: "0.3.1"
4760+
version: "0.3.2"
47614761
};
47624762

47634763

@@ -9318,7 +9318,7 @@ var CSSLint = (function(){
93189318
var rules = [],
93199319
api = new parserlib.util.EventTarget();
93209320

9321-
api.version = "0.3.1";
9321+
api.version = "0.3.2";
93229322

93239323
//-------------------------------------------------------------------------
93249324
// Rule Management
@@ -10588,6 +10588,17 @@ var processFile = function(filename, options) {
1058810588
var reportMessages = function(messages, warnings, errors, filename) {
1058910589
print("\n\ncsslint: There are " + errors.length + " errors and " + warnings.length + " warnings in " + filename + ".");
1059010590

10591+
var pos = filename.lastIndexOf("/"),
10592+
shortFilename = filename;
10593+
10594+
if (pos == -1){
10595+
pos = filename.lastIndexOf("\\");
10596+
}
10597+
if (pos > -1){
10598+
shortFilename = filename.substring(pos+1);
10599+
}
10600+
10601+
1059110602
//rollups at the bottom
1059210603
messages.sort(function (a, b){
1059310604
if (a.rollup && !b.rollup){
@@ -10600,7 +10611,7 @@ var reportMessages = function(messages, warnings, errors, filename) {
1060010611
});
1060110612

1060210613
messages.forEach(function (message, i) {
10603-
print("\n" + filename);
10614+
print("\n" + shortFilename + ":");
1060410615
if (message.rollup) {
1060510616
print("" + (i+1) + ": " + message.type);
1060610617
print(message.message);

0 commit comments

Comments
 (0)