Skip to content

Conversation

terry90
Copy link

@terry90 terry90 commented May 10, 2017

Add defined? checks for instance variables.

I will need feedback to get rid of more warnings, I am not aware of every warning triggered yet.
If someone has warnings too, let me know and I'll update the PR.

Reference to #1582

@grape-bot
Copy link

grape-bot commented May 10, 2017

2 Warnings
⚠️ There’re library changes, but not tests. That’s OK as long as you’re refactoring existing code.
⚠️ Unless you’re refactoring existing code, please update CHANGELOG.md.

Here's an example of a CHANGELOG.md entry:

* [#1629](https://github.com/ruby-grape/grape/pull/1629): Silence warnings "instance var not initialized" - [@terry90](https://github.com/terry90).

Generated by 🚫 danger

@dblock
Copy link
Member

dblock commented May 10, 2017

This looks like a hack to prevent warnings and introduces a dynamic lookup. The whole point of the warning is to actually initialize these in an initializer, I would take a PR that accomplishes that.

@terry90
Copy link
Author

terry90 commented May 10, 2017

Fair enough.
Would you point me in the right direction please ? I'm not sure about how to achieve this in a clean way.
🙏

@thogg4
Copy link
Contributor

thogg4 commented May 10, 2017

@dblock maybe like this? #1632

@dblock
Copy link
Member

dblock commented May 12, 2017

I'll close this one.

@dblock dblock closed this May 12, 2017
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.

4 participants