pronto icon indicating copy to clipboard operation
pronto copied to clipboard

error raised but exit code is still 0

Open gingerlime opened this issue 4 years ago • 0 comments

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.

gingerlime avatar Mar 24 '21 07:03 gingerlime