You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each error message reports the line & columns position, using the line and col strings before printing the number.
In addition, error messages also print line & column position in the second line, while warnings do not.
This line's line & column position use the word char and sometimes character instead of col, with no logical explanation for this behaviour.
columnis the same ascharacter semantic-wise, why use different words in different parts of the output? Either use column, col, character, or char, but not all of them together.
In short:
There is no need to print line & column position in the error description, since they are printed at the first line of each error message.
Use col only, no column, char, character, etc.
Example, with my comments after each <---:
~/example/css$ csslint example.css
csslint: There are 110 errors and 236 warnings in /Users/ory/example/css/example.css.
...
/Users/example/css/example.css
27: error at line 153, col 1 <--- OK.
Unexpected token '@' at line 153, char 1. <--- Remove `at line 153, char`. Print only `Unexpected token '@'.`
@-webkit-keyframes glow {
/Users/example/css/example.css
28: error at line 154, col 14 <--- OK.
Expected COLON at line 154, character 14. <--- Remove `at line 153, character`. Print only `Expected COLON.`
from {
/Users/example/css/example.css
344: warning at line 491, col 13 <--- OK.
Element (span.class_b) is overqualified, just use .class_b without element name. <--- OK.
.class_a span.class_b {
...
The text was updated successfully, but these errors were encountered:
The issue you're pointing out occurs when the parser returns a syntax error vs. when the linter reports a warning. The parser always returns line/col information when an error occurs, and since it can be used in many places other than CSS Lint, it wouldn't make sense to change the parser to not do that (since this is important information). I can see about formatting the message output to strip it out.
The output should be consistent, just like every other syntax-checker's output. See #88 for an example of JSHint, which is the same as Crockford's JSLint.
As I said before in that other issue, this is targeted towards making it easy for programs to parse the output. The results are eventually printed into IDEs' error windows.
Relates to #87, #88.
line
andcol
strings before printing the number.char
and sometimescharacter
instead ofcol
, with no logical explanation for this behaviour.column
is the same ascharacter
semantic-wise, why use different words in different parts of the output? Either usecolumn
,col
,character
, orchar
, but not all of them together.In short:
col
only, nocolumn
,char
,character
, etc.Example, with my comments after each
<---
:The text was updated successfully, but these errors were encountered: