Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass cli options #25

Open
travi opened this issue Jul 18, 2016 · 3 comments
Open

pass cli options #25

travi opened this issue Jul 18, 2016 · 3 comments

Comments

@travi
Copy link

travi commented Jul 18, 2016

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.

@DanPurdy
Copy link
Member

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.

@wingy3181
Copy link

@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 #31?

@AlexSkrypnyk
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants