cucumber-attic / gherkin2

A fast Gherkin parser in Ragel (The parser behind Cucumber)
MIT License
382 stars 221 forks source link

Fix Ruby 2.0 warnings #265

Closed mattwynne closed 10 years ago

mattwynne commented 11 years ago

We're using warnings in the build for cucumber/cucumber-ruby-core and there's a lot of noise coming from Gherkin.

Examples:

lib/gherkin/tag_expression.rb:23: warning: assigned but unused variable - vars
lib/gherkin/listener/formatter_listener.rb:137: warning: instance variable @current_builder not initialized
lib/gherkin/listener/formatter_listener.rb:123: warning: instance variable @examples_id not initialized

See also cucumber/cucumber-ruby-core/issues/6

aslakhellesoy commented 11 years ago

We have to ask ourselves - how valuable are these warnings? Since ruby isn't able to only warn about certain files, there is bound to be noise from dependent libs. Maybe the output could be passed through grep to filter out the lines that are not from the code in the git repo? And then fail the build if there are any warnings in our code.

mattwynne commented 11 years ago

That's all this ticket is for - to fix the warnings coming out of the code in this project.

os97673 commented 10 years ago

I've fixed two warnings, only the first one isn't fixed now, but it looks like this is the case where ruby is unable to work with its meta magic ;)