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

Errors found without any errors on changed files #3

Open
kylemellander opened this issue Nov 13, 2019 · 3 comments · May be fixed by #34
Open

Errors found without any errors on changed files #3

kylemellander opened this issue Nov 13, 2019 · 3 comments · May be fixed by #34
Assignees
Labels
bug Something isn't working

Comments

@kylemellander
Copy link

I've experienced an issue where Balto is showing a check as failed with a lot of errors, even though it does not list any errors. I have also manually verified locally that the files in question do not contain errors.

The issue can be seen on this PR: https://github.com/ministrycentered/check-ins/pull/3548

@danielma
Copy link
Member

I'm pretty sure what's happening is that eslint is reporting 33 errors (which I can verify locally with git diff --name-only --diff-filter AM d66335d9070eb693f8c7d422b70ce279d09d34da | grep '\(jsx\|js\)$' | xargs eslint) but since none of those errors are on lines you actually changed in that PR, we're not creating annotations.

This is a bug worth fixing. If we're not creating annotations, we shouldn't be counting those errors towards the final result

@danott
Copy link
Member

danott commented Nov 25, 2019

I believe I've encountered the same error on ChurchCenterApp: https://github.com/ministrycentered/ChurchCenterApp/pull/892/checks?check_run_id=319865064

@danielma danielma self-assigned this Nov 25, 2019
@sheck sheck added the bug Something isn't working label May 18, 2023
@sheck
Copy link
Member

sheck commented May 18, 2023

I think I found the source of this bug while looking into something for @alexandervalencia

const { results, errorCount, warningCount } = report

On that line we are grabbing the error and warning count directly from the eslint output, before filtering out errors and warnings from lines that were not changed in the PR.

Those constants currently determine the conclusion level of the check, which could result in failures being described in this issue if you make a "clean" line change in an already "dirty" file.

https://app.asana.com/0/1203194086773994/1204631278549623/f

sheck added a commit that referenced this issue May 22, 2023
eslint lints by files, but we only care about _specific lines_ in each
file. If you made a "clean" change in a "dirty" file, we would report
the total number of eslint errors and warnings found — even if we didn't
generate any annotations because your diff was good.

This change has us adding up errors and warning from the changes we deem
relevant to the PR instead of using the original numbers from eslint.

Fixes #3
@sheck sheck linked a pull request Sep 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants