Add error/warning indication in compact format. #152

Closed
oryband opened this Issue Aug 8, 2011 · 2 comments

Comments

Projects
None yet
3 participants
@oryband

oryband commented Aug 8, 2011

Related to issue #88.

CLI's compact format csslint --format=compact filename.css doesn't indicate if a line is an error or a warning.

Purpose of compact format is to make it easier to parse by programs. This way we can integrate CSS Lint's into Vim's syntax checking capabilities (using Syntastic plugin, if you must know). It is very relevant to state this kind of info.

Here's the current output, which should be fixed:

$ csslint --format=compact base.css

base.css: line 2, col 1, Expected RBRACE at line 2, col 1.
base.css: line 97, col 1, Missing vendor-prefixed CSS gradients for Webkit (Safari, Chrome), Internet Explorer 10+, Opera 11.1+.
base.css: line 35, col 3, Negative text-indent doesn't work well with RTL. If you use text-indent for image replacement explicitly set text-direction for that item to ltr.
base.css: line 57, col 1, Don't use IDs in selectors.
base.css: line 61, col 1, Don't use IDs in selectors.

My suggestion is to add a Error: / Warning: string at the begginning of each line. E.g:

Error: base.css: line 2, col 1, Expected RBRACE at line 2, col 1.
Warning: base.css line 57, col 1, Don't use IDs in selectors.

You're welcome to suggest a better alternative, of course. :)

@eriwen

This comment has been minimized.

Show comment Hide comment
@eriwen

eriwen Aug 8, 2011

Member

Will add this weekend unless someone gets to it before I do.

Member

eriwen commented Aug 8, 2011

Will add this weekend unless someone gets to it before I do.

@nzakas

This comment has been minimized.

Show comment Hide comment
@nzakas

nzakas Oct 14, 2011

Contributor

@eriwen - it looks like this change may have gotten lost in the shuffle. Would you mind taking a look?

Contributor

nzakas commented Oct 14, 2011

@eriwen - it looks like this change may have gotten lost in the shuffle. Would you mind taking a look?

eriwen added a commit to eriwen/csslint that referenced this issue Oct 15, 2011

nzakas added a commit that referenced this issue Oct 18, 2011

Merge pull request #192 from eriwen/master
Fix for issue #152 regarding compact output format

@nzakas nzakas closed this Oct 18, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment