Skip to content
New issue

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

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

Already on GitHub? # to your account

error raised but exit code is still 0 #405

Open
gingerlime opened this issue Mar 24, 2021 · 0 comments
Open

error raised but exit code is still 0 #405

gingerlime opened this issue Mar 24, 2021 · 0 comments

Comments

@gingerlime
Copy link

gingerlime commented Mar 24, 2021

We bumped into an edge case that we're not entirely sure about.

We're running pronto on our CI with bundle exec pronto run --exit-code -c origin/master -f github_combined_status github_pr which works great 👍

However, if we create a branch (without a PR), then we see this on our CI logs:

Running Pronto::ESLintNpm 
Running Pronto::Haml
Running Pronto::Rubocop
app/views/layouts/_base.html.haml:10 E: Style/StringLiterals: Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Pronto errored: Pull request for branch test-branch was not found in our_github/repo.
warning: parser/current is loading parser/ruby26, which recognizes
warning: 2.6.6-compliant syntax, but you are running 2.6.5.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Hold on, I am eager loading the application.
All is good!

So it seems like not only the Pronto errored doesn't return an exit code to reflect a problem, but also the actual linting error gets swallowed ...

We can obviously improve our CI execution and only use github_pr when there's a PR. I still thought it's something worth reporting, because there's a false negative here.

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

No branches or pull requests

1 participant