Skip to content
This repository was archived by the owner on May 9, 2021. It is now read-only.

Prevent panic in case there are no files to check. #299

Closed
wants to merge 2 commits into from
Closed

Prevent panic in case there are no files to check. #299

wants to merge 2 commits into from

Conversation

dim13
Copy link
Contributor

@dim13 dim13 commented Jun 1, 2017

As with issue #239 auto-generated files are skipped now. In case some packages consist of auto-generated files only, golint panics on nil pointer dereference. This PR fixes this issue.

@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for the commit author(s). If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.

@googlebot
Copy link

CLAs look good, thanks!

@dsnet
Copy link
Member

dsnet commented Jun 1, 2017

This is the wrong layer to perform this check. We should simply check if pkg.files is empty on L114 after the for loop.

@dim13
Copy link
Contributor Author

dim13 commented Jun 1, 2017

Agree, please see updated PR.

@dsnet
Copy link
Member

dsnet commented Jun 2, 2017

Merged as c5fb716.

@dsnet dsnet closed this Jun 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants