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

Fail report when tests are failing / comments are added #11

Open
alfonsogarza opened this issue Jul 18, 2021 · 1 comment
Open

Fail report when tests are failing / comments are added #11

alfonsogarza opened this issue Jul 18, 2021 · 1 comment

Comments

@alfonsogarza
Copy link

When there are lint or detetk errors and comments are added to the Pull Request, could there be a way of signaling a failure so the "Check" in the Pull Request fails?

Currently, even when comments are added the check/report succeeds. Maybe this is a little out of scope as the tool becomes more of a checker than reporter, but would like to hear your thoughts.

@worker8
Copy link
Owner

worker8 commented Jul 28, 2021

This is indeed outside the scope of this project, but I think you can already do what you want.

For example, for running detekt, it's in fact throwing an error by default, that's why in my Readme, I have to add continue-on-error: true to make it not trigger the error.

      - name: Run detekt
        run: ./gradlew detekt
        continue-on-error: true

If you remove this line, detekt should throw error whenever there's a warning.

As for lint, I think you can use this configuration on your gradle:

android {
  lintOptions {
    warningsAsErrors true
  }
}

Whenever there's a warning, it will cause a build error.

Hope it helps!

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

2 participants