Open travi opened 8 years ago
Sorry I never replied to this issue. The max-warnings option will be available in your config file from Sass-lint 1.10 which I would hope to see released in the next few weeks.
@DanPurdy So sass lint 1.10 has been out for awhile now and it doesn't work still.
I just looked at the code and how they implemented the max-warnings option (See https://github.com/sasstools/sass-lint/blob/master/bin/sass-lint.js#L19)
It seems like we would need to make a change similar to the current PR https://github.com/sasstools/grunt-sass-lint/pull/31?
@DanPurdy Passing max-warnings
through grunt config does not work. Using sass-lint
1.12.1
.
This plugin does not use bin/sass-lint.js
binary where all processing of the expected warnings and fails happens (https://github.com/sasstools/sass-lint/blob/develop/index.js#L308). It calls linting directly and does not handle results in the same way as bin/sass-lint.js
: https://github.com/sasstools/grunt-sass-lint/blob/master/tasks/sass-lint.js#L29 handles errors only.
@wingy3181 is absolutely right - there is now a need to handle warnings within this plugin in exactly the same way as bin/sass-lint.js
does:
https://github.com/sasstools/sass-lint/blob/develop/index.js#L308
Currently, inability to enforce warnings to fail is a huge blocker for using this package during automated builds.
is there a way to set the cli options from the grunt config? my attempts have fallen short so far.
my specific use case is that i would like to ensure that build fails on warnings (since there doesn't seem to be a way to make all of them error level by default). i see that there is a max-warnings option that i would like to set to
0
, but i can't figure out how to set it.