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

--strict mode not working, even with via additional_swiftlint_args #151

Open
Jeehut opened this issue Aug 20, 2020 · 4 comments
Open

--strict mode not working, even with via additional_swiftlint_args #151

Jeehut opened this issue Aug 20, 2020 · 4 comments

Comments

@Jeehut
Copy link

Jeehut commented Aug 20, 2020

I just wanted to setup swiftlint via danger using this gem, but when I specify the additional_swiftlint_args: '--strict' as implemented in #59, nothing actually changes, still all warnings show up as warnings and danger doesn't fail, although I have setup both fail_on_error: true on this gem and even --fail-on-errors=true on danger itself. Even setting max_num_violations to 0 doesn't fail if there's only a warning. So basically there seems to be no way to make the CI fail on warnings as of now. 😞

Note that the --strict parameter does not convert warnings to errors, instead it just ensures the overall swiftlint command fails by returning with a non zero status code (see this comment). That's probably why --strict is doing nothing ...

@Jeehut Jeehut changed the title Passing --strict doesn't do work --strict mode not working, even with via additional_swiftlint_args Aug 20, 2020
@ashfurrow
Copy link
Owner

I see, thanks for opening the issue. Can you show how you're invoking this in the Dangerfile? Along with a version number for Danger, the plugin, and Ruby would be helpful 👍

@quintuschen
Copy link

I have the same problem. I wrote like the following in Dangerfile:

swiftlint.lint_files inline_mode: true, fail_on_error: true, additional_swiftlint_args: '--strict'

@Wooder
Copy link

Wooder commented Dec 21, 2021

Has anyone found a (maybe temporary) solution of the problem in the meantime?

@quangpc
Copy link

quangpc commented Jul 28, 2022

I have same issue.
Did anyone find the solution for this problem? Thank you.

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

5 participants