Permalink
Browse files

Fixed regression in output format for CLI (fixes #87)

  • Loading branch information...
1 parent ff17048 commit 388ad2d07e60818a7e5f637037d92fccf3a73922 Nicholas C. Zakas committed Jun 26, 2011
View
@@ -1,6 +1,14 @@
Next (not yet released)
* n/a
+June 25, 2011 - v0.3.2
+
+* Fixed regression in output format for CLI (fixes #87)
+
+June 25, 2011 - v0.3.1
+
+* Fixed EOL issue for Node.js CLI
+
June 25, 2011 - v0.3.0
* Rhino and Node CLIs both exit with code 1 when there are errors (pull #72)
View
@@ -1,7 +1,7 @@
<project name="csslint" default="all">
<!-- version number -->
- <property name="csslint.version" value="0.3.1" />
+ <property name="csslint.version" value="0.3.2" />
<!-- the directories containing the source files -->
<property name="src.dir" value="./src" />
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
var CSSLint = (function(){
/*!
Parser-Lib
@@ -10588,6 +10588,17 @@ var processFile = function(filename, options) {
var reportMessages = function(messages, warnings, errors, filename) {
print("\n\ncsslint: There are " + errors.length + " errors and " + warnings.length + " warnings in " + filename + ".");
+ var pos = filename.lastIndexOf("/"),
+ shortFilename = filename;
+
+ if (pos == -1){
+ pos = filename.lastIndexOf("\\");
+ }
+ if (pos > -1){
+ shortFilename = filename.substring(pos+1);
+ }
+
+
//rollups at the bottom
messages.sort(function (a, b){
if (a.rollup && !b.rollup){
@@ -10600,7 +10611,7 @@ var reportMessages = function(messages, warnings, errors, filename) {
});
messages.forEach(function (message, i) {
- print("\n" + filename);
+ print("\n" + shortFilename + ":");
if (message.rollup) {
print("" + (i+1) + ": " + message.type);
print(message.message);
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
View
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
var CSSLint = (function(){
/*!
Parser-Lib
View
@@ -1,5 +1,5 @@
#!/usr/bin/env node
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
//print for rhino and nodejs
if(typeof print == "undefined") {
var print = console.log;
@@ -65,6 +65,17 @@ var processFile = function(filename, options) {
var reportMessages = function(messages, warnings, errors, filename) {
print("\n\ncsslint: There are " + errors.length + " errors and " + warnings.length + " warnings in " + filename + ".");
+ var pos = filename.lastIndexOf("/"),
+ shortFilename = filename;
+
+ if (pos == -1){
+ pos = filename.lastIndexOf("\\");
+ }
+ if (pos > -1){
+ shortFilename = filename.substring(pos+1);
+ }
+
+
//rollups at the bottom
messages.sort(function (a, b){
if (a.rollup && !b.rollup){
@@ -77,7 +88,7 @@ var reportMessages = function(messages, warnings, errors, filename) {
});
messages.forEach(function (message, i) {
- print("\n" + filename);
+ print("\n" + shortFilename + ":");
if (message.rollup) {
print("" + (i+1) + ": " + message.type);
print(message.message);
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
@@ -4756,7 +4756,7 @@ Tokens :Tokens
*/
var YUITest = {
- version: "0.3.1"
+ version: "0.3.2"
};
@@ -9317,7 +9317,7 @@ var CSSLint = (function(){
var rules = [],
api = new parserlib.util.EventTarget();
- api.version = "0.3.1";
+ api.version = "0.3.2";
//-------------------------------------------------------------------------
// Rule Management
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
var CSSLint = (function(){
/*!
Parser-Lib
@@ -4757,7 +4757,7 @@ Tokens :Tokens
*/
var YUITest = {
- version: "0.3.1"
+ version: "0.3.2"
};
@@ -9318,7 +9318,7 @@ var CSSLint = (function(){
var rules = [],
api = new parserlib.util.EventTarget();
- api.version = "0.3.1";
+ api.version = "0.3.2";
//-------------------------------------------------------------------------
// Rule Management
@@ -10588,6 +10588,17 @@ var processFile = function(filename, options) {
var reportMessages = function(messages, warnings, errors, filename) {
print("\n\ncsslint: There are " + errors.length + " errors and " + warnings.length + " warnings in " + filename + ".");
+ var pos = filename.lastIndexOf("/"),
+ shortFilename = filename;
+
+ if (pos == -1){
+ pos = filename.lastIndexOf("\\");
+ }
+ if (pos > -1){
+ shortFilename = filename.substring(pos+1);
+ }
+
+
//rollups at the bottom
messages.sort(function (a, b){
if (a.rollup && !b.rollup){
@@ -10600,7 +10611,7 @@ var reportMessages = function(messages, warnings, errors, filename) {
});
messages.forEach(function (message, i) {
- print("\n" + filename);
+ print("\n" + shortFilename + ":");
if (message.rollup) {
print("" + (i+1) + ": " + message.type);
print(message.message);
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
@@ -4756,7 +4756,7 @@ Tokens :Tokens
*/
var YUITest = {
- version: "0.3.1"
+ version: "0.3.2"
};
@@ -9317,7 +9317,7 @@ var CSSLint = (function(){
var rules = [],
api = new parserlib.util.EventTarget();
- api.version = "0.3.1";
+ api.version = "0.3.2";
//-------------------------------------------------------------------------
// Rule Management
View
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
var CSSLint = (function(){
/*!
Parser-Lib
@@ -4757,7 +4757,7 @@ Tokens :Tokens
*/
var YUITest = {
- version: "0.3.1"
+ version: "0.3.2"
};
@@ -9318,7 +9318,7 @@ var CSSLint = (function(){
var rules = [],
api = new parserlib.util.EventTarget();
- api.version = "0.3.1";
+ api.version = "0.3.2";
//-------------------------------------------------------------------------
// Rule Management
View
@@ -1,5 +1,5 @@
#!/usr/bin/env node
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
//print for rhino and nodejs
if(typeof print == "undefined") {
var print = console.log;
@@ -65,6 +65,17 @@ var processFile = function(filename, options) {
var reportMessages = function(messages, warnings, errors, filename) {
print("\n\ncsslint: There are " + errors.length + " errors and " + warnings.length + " warnings in " + filename + ".");
+ var pos = filename.lastIndexOf("/"),
+ shortFilename = filename;
+
+ if (pos == -1){
+ pos = filename.lastIndexOf("\\");
+ }
+ if (pos > -1){
+ shortFilename = filename.substring(pos+1);
+ }
+
+
//rollups at the bottom
messages.sort(function (a, b){
if (a.rollup && !b.rollup){
@@ -77,7 +88,7 @@ var reportMessages = function(messages, warnings, errors, filename) {
});
messages.forEach(function (message, i) {
- print("\n" + filename);
+ print("\n" + shortFilename + ":");
if (message.rollup) {
print("" + (i+1) + ": " + message.type);
print(message.message);
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
-/* Build time: 26-June-2011 10:55:08 */
+/* Build time: 26-June-2011 03:42:58 */
/*!
Parser-Lib
Copyright (c) 2009-2011 Nicholas C. Zakas. All rights reserved.
@@ -4756,7 +4756,7 @@ Tokens :Tokens
*/
var YUITest = {
- version: "0.3.1"
+ version: "0.3.2"
};
@@ -9317,7 +9317,7 @@ var CSSLint = (function(){
var rules = [],
api = new parserlib.util.EventTarget();
- api.version = "0.3.1";
+ api.version = "0.3.2";
//-------------------------------------------------------------------------
// Rule Management
@@ -1,6 +1,6 @@
{
"name": "csslint",
- "version": "0.3.1",
+ "version": "0.3.2",
"description": "CSSLint",
"author": "Nicholas C. Zakas",
"os": ["darwin", "linux"],
View
@@ -63,6 +63,17 @@ var processFile = function(filename, options) {
var reportMessages = function(messages, warnings, errors, filename) {
print("\n\ncsslint: There are " + errors.length + " errors and " + warnings.length + " warnings in " + filename + ".");
+ var pos = filename.lastIndexOf("/"),
+ shortFilename = filename;
+
+ if (pos == -1){
+ pos = filename.lastIndexOf("\\");
+ }
+ if (pos > -1){
+ shortFilename = filename.substring(pos+1);
+ }
+
+
//rollups at the bottom
messages.sort(function (a, b){
if (a.rollup && !b.rollup){
@@ -75,7 +86,7 @@ var reportMessages = function(messages, warnings, errors, filename) {
});
messages.forEach(function (message, i) {
- print("\n" + filename);
+ print("\n" + shortFilename + ":");
if (message.rollup) {
print("" + (i+1) + ": " + message.type);
print(message.message);

0 comments on commit 388ad2d

Please sign in to comment.