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

Initialize local variable before using it #5342

Merged
merged 2 commits into from Feb 25, 2019

Conversation

@stsewd
Copy link
Member

@stsewd stsewd commented Feb 22, 2019

If the try..except block fails and there is not
results, we end up with updated undefined.

Sentry issue https://sentry.io/organizations/read-the-docs/issues/902366698/?project=148442&referrer=alert_email&statsPeriod=14d

stsewd added 2 commits Feb 22, 2019
If the try..except block fails and there is not
results, we end up with `updated` undefined.
@stsewd stsewd requested a review from Feb 22, 2019
Copy link
Member

@ericholscher ericholscher left a comment

Surprised tests or linting didn't catch this. Is there a good way to catch this kind of stuff in the future?

@stsewd
Copy link
Member Author

@stsewd stsewd commented Feb 22, 2019

Surprised tests or linting didn't catch this. Is there a good way to catch this kind of stuff in the future?

More tests/coverage p: This is still tricky for static analyzers I guess

@humitos humitos merged commit fab3be9 into readthedocs:master Feb 25, 2019
1 check passed
@stsewd stsewd deleted the initialize-local-variable branch Feb 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants