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

Fix Ruby warnings #246

Closed
tute opened this issue Mar 10, 2016 · 2 comments
Closed

Fix Ruby warnings #246

tute opened this issue Mar 10, 2016 · 2 comments

Comments

@tute
Copy link
Member

tute commented Mar 10, 2016

RUBYOPT=-w rake runs all tests with ruby warnings enabled, which are printed out in stderr. They are very noisy, as it shows warnings for every dependency in use alongside the tests output, so they are most useful when filtering only the warnings coming from this gem. We do that redirecting tests stdout to /dev/null (ignoring it), and redirecting stderr to stdout, with the following command:

RUBYOPT=-w rake 2>&1 1>/dev/null | grep merit | sort --unique

The output is:

/.../merit/lib/merit/controller_extensions.rb:50: warning: instance variable @user not initialized
/.../merit/lib/merit/controller_extensions.rb:50: warning: instance variable @user not initialized
/.../merit/test/dummy/app/models/merit/point_rules.rb:39: warning: ambiguous first argument; put parentheses or a space even after `-' operator

Merit should run without any warnings.

@yakschuss
Copy link
Contributor

@tute - let me know if there's any further action I can take to help with this issue.

@tute
Copy link
Member Author

tute commented Mar 14, 2016

Yes, thanks! Will close this issue in favor of your PR: #247.

@tute tute closed this as completed Mar 14, 2016
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