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

fix: TypeError: Cannot read property 'errorCount' of undefined #351

Merged
merged 2 commits into from
Jan 25, 2023

Conversation

pycckuu
Copy link
Contributor

@pycckuu pycckuu commented Aug 8, 2022

Without this patch, there are situations when the .solhintignore file
causes all inputs files to be ignored. This is a problem because the
'reports' variable ends up being an empty array, and therefore
reports[0] is undefined.

This patch solves the problem by checking that the reports array exists
and has a length greater than 0.

Thanks to Adam Spiers (@aspiers) who originally discovered a bug.

Issue-URL: #239

Without this patch, there are situations when the .solhintignore file
causes all inputs files being ignored. This is a problem because the
'reports' variable ends up being an empty array, and therefore
reports[0] is undefined.

This patch solves the problem by checking that reports array exists and
has a length greater than 0.

Thanks to Adam Spiers (@aspiers) who originally discovered a bug.

Issue-URL: https://bytemeta.vip/repo/protofire/solhint/issues/239
@aspiers
Copy link

aspiers commented Aug 8, 2022

Nice work @pycckuu :-) Please note that the correct issue URL is https://github.com/protofire/solhint/issues/239 (or actually just #239 since we're already in this repo!) That bytemeta site is just a vampire attack clone of GitHub, which does not deserve being linked to ;-)

@dbeal-eth
Copy link

@aspiers can we get this merged? we ran into this issue today and its stopping us from using --max-warnings=0 on our CI for some reason

@aspiers
Copy link

aspiers commented Jan 10, 2023

I would love that but I don't maintain this repository.

dbale-altoros
dbale-altoros previously approved these changes Jan 25, 2023
@dbale-altoros dbale-altoros self-requested a review January 25, 2023 14:14
@dbale-altoros dbale-altoros dismissed their stale review January 25, 2023 14:14

conflict on solhint.js

@fvictorio fvictorio merged commit afc1d76 into protofire:master Jan 25, 2023
aspiers referenced this pull request in toruichikawa/solhint Aug 20, 2024
Without this patch, there are situations when the .solhintignore file
causes all inputs files being ignored. This is a problem because the
'reports' variable ends up being an empty array, and therefore
reports[0] is undefined.

This patch solves the problem by checking that reports array exists and
has a length greater than 0.

Thanks to Adam Spiers (@aspiers) who originally discovered a bug.

Issue-URL: https://bytemeta.vip/repo/protofire/solhint/issues/239
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

Successfully merging this pull request may close these issues.

5 participants