Closed idgserpro closed 7 years ago
@idgserpro is p.r.codeanalysis using that configuration file anyway? If you change the exclude-list the other files are also checked?
@gforcada yes, codeanalysis is using .csslintrc
. But my example of .csslintrc
was wrong. Fix in description of issue.
When I use .csslintrc
as is the description of the issue, it does not indicate any error.
When I use:
--format=compact
--quiet
It indicates error in the three files.
Ops, the way it was, he should not indicate error really. I'll check here.
.csslintrc
of description changed again.
What happens is that some warnings are only showing if an error occurs in a CSS file. In my example when:
withproblem.css
, withproblem2.css
and withproblem3.css
are:
#test {
width: 100%;
}
no error is indicated.
But if withproblem.css
and withproblem3.css
are:
#test {
width: 100%;
}
and withproblem2.css
:
#test {
width: 100%;
So:
CSS Lint........................[ FAILURE ] in 0.253s
/home/user/my.product/src/my/product/folder1/withproblem.css: line 1, col 1, Warning - Don't use IDs in selectors. (ids)
/home/user/my.product/src/my/product/folder1/folder12/withproblem2.css: line 1, col 1, Warning - Don't use IDs in selectors. (ids)
/home/user/my.product/src/my/product/folder1/folder12/withproblem2.css: line 3, col 1, Error - Expected RBRACE at line 3, col 1. (errors)
/home/user/my.product/src/my/product/folder1/folder12/withproblem2.css: line 3, col 1, Error - Expected RBRACE at line 3, col 1. (errors)
Warning of withproblem.css
that were not shown before are now shown. And errors of withproblem2.css
that should be ignored are shown.
@gforcada can you confirm that? This seems to me a serious bug.
@idgserpro I remember seeing that behavior as well, but that should be reported upstream to csslint
@gforcada I tested here again and it seems that the problem of not ignoring files has been solved by the new version of csslint
installed by the node
.
However, the situation of plone.recipe.codeanalysis
shows csslint warnings only when an error occurs in a file, still occurs. I think the warnings should be displayed even if a csslint error doesn't occur.
@idgserpro then this is probably when you want to make your changes: https://github.com/plone/plone.recipe.codeanalysis/blob/master/plone/recipe/codeanalysis/csslint.py#L30-L42
@gforcada thank you!
As the problem of ignoring files has been solved by the csslint version, I will close the issue.
I'll open another issue about the warning.
If I have a product with the structure:
and .csslintrc ignore folder12 and folder2:
So codeanalysis does not indicate error in file
my.product/src/my/product/folder1/withproblem.css
but should indicate.