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

Pragma-like comment to suppress --warn-undefined-variables #42

Open
singalen opened this issue Feb 7, 2019 · 2 comments
Open

Pragma-like comment to suppress --warn-undefined-variables #42

singalen opened this issue Feb 7, 2019 · 2 comments

Comments

@singalen
Copy link

singalen commented Feb 7, 2019

--warn-undefined-variables is really useful, but some modules are relying on undefined variables being empty, and they generate the checks in thousands. Not always they can be rewritten.
In this cases, it would be beneficial to have a pragma-like comment to suppress the warning for some of lines.
grep-ing them out would only help if the code testing the variable is not in $(eval).

@rocky
Copy link
Owner

rocky commented Feb 8, 2019

Ok. Want to try your hand at addressing this in a PR?

@singalen
Copy link
Author

singalen commented Feb 8, 2019

I might. No promises, though - I'm overcommitted for the nearest month.
Considering that grep works nearly as well...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants