Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.

Incorrectly exits with exit code 2 for only warnings #22

Closed
ghost opened this issue Apr 6, 2017 · 1 comment
Closed

Incorrectly exits with exit code 2 for only warnings #22

ghost opened this issue Apr 6, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 6, 2017

Stylelint cli exits with exit code 2 for a run with only warnings (see this build) when using stylelint-processor-styled-components. After removing stylelint-processor-styled-components from the build chain, the process exits with 0, as expected.

Since removing the processing fixes the issue I'm suspecting that this lib is the cause, but I'm unsure where exactly it's going wrong. Is it possible that this processor somehow could cause the process to exit with an error code of 2 instead of 0?

alexander-akait pushed a commit to alexander-akait/stylelint-processor-styled-components that referenced this issue Apr 15, 2017
styled-components#22

BTW, i would recommend don't changed `stylelintResult`, just add node in `README.md` about disable `no-empty-source` and `no-missing-end-of-source-newline`, in next version we can change `stylelintResult` (example rename `warnings` to another name) and `stylelint-processor-styled-components` will cease to work as expected.
@ghost
Copy link
Author

ghost commented Apr 17, 2017

So this had me stumped for a while, but @evilebottnawi found the source of the problem. PR #23 addresses it, and for an example of the bug see: https://github.com/ismay/stylelint-test. Further discussion of this bug can also be found here: stylelint/stylelint#2473. It was quite a tricky bug, since it incorrectly fails builds, but doesn't log any errors to the console.

ghost pushed a commit to alexander-akait/stylelint-processor-styled-components that referenced this issue Jun 4, 2017
styled-components#22

BTW, i would recommend don't changed `stylelintResult`, just add node in `README.md` about disable `no-empty-source` and `no-missing-end-of-source-newline`, in next version we can change `stylelintResult` (example rename `warnings` to another name) and `stylelint-processor-styled-components` will cease to work as expected.
@ghost ghost closed this as completed in #23 Jun 4, 2017
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants