fix: TypeError: Cannot read property 'errorCount' of undefined by pycckuu · Pull Request #351 · protofire/solhint · GitHub
Skip to content

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

Merged
fvictorio merged 2 commits into
protofire:masterfrom
pycckuu:fix-reports-0-undefined
Jan 25, 2023
Merged

fvictorio merged 2 commits into
protofire:masterfrom
pycckuu:fix-reports-0-undefined

Conversation

@pycckuu

@pycckuu pycckuu commented Aug 8, 2022 •

Copy link
Copy Markdown
Contributor

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

aspiers commented Aug 8, 2022

Copy link
Copy Markdown

@dbeal-eth

Copy link
Copy Markdown

@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

aspiers commented Jan 10, 2023

Copy link
Copy Markdown

dbale-arg
dbale-arg previously approved these changes Jan 25, 2023
@dbale-arg
dbale-arg self-requested a review January 25, 2023 14:14
@dbale-arg
dbale-arg 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