Skip to content

Suppress "assigned but unused variable" warning #561

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

Merged
merged 1 commit into from
Nov 16, 2017

Conversation

pocke
Copy link
Member

@pocke pocke commented Nov 16, 2017

Currently rake -T warns an unused local variable.

$ bundle exec rake -T
/home/pocke/ghq/github.com/ruby/rdoc/Rakefile:107: warning: assigned but unused variable - options
rake build            # Build rdoc-6.0.0.beta3.gem into the pkg directory
rake clean            # Remove any temporary products
rake clobber          # Remove any generated files
rake clobber_rdoc     # Remove RDoc HTML files
rake diff_rubinius    # Diffs Rubinius HEAD with the currently checked-out copy of RDoc
rake diff_ruby        # Diffs Ruby HEAD with the currently checked-out copy of RDoc
rake generate         # Genrate all files used racc and kpeg
rake install          # Build and install rdoc-6.0.0.beta3.gem into system gems
rake install:local    # Build and install rdoc-6.0.0.beta3.gem into system gems without network access
rake rdoc             # Build RDoc HTML files
rake release[remote]  # Create tag v6.0.0.beta3 and build and push rdoc-6.0.0.beta3.gem to rubygems.org
rake rerdoc           # Rebuild RDoc HTML files
rake test             # Run tests
rake update_rubinius  # Updates Rubinius HEAD with the currently checked-out copy of RDoc
rake update_ruby      # Updates Ruby HEAD with the currently checked-out copy of RDoc

This change will suppress the warning.
Note: The removed options variable value is same as diff_options.

Currently `rake -T` warns an unused local variable.

```console
$ bundle exec rake -T
/home/pocke/ghq/github.com/ruby/rdoc/Rakefile:107: warning: assigned but unused variable - options
rake build            # Build rdoc-6.0.0.beta3.gem into the pkg directory
rake clean            # Remove any temporary products
rake clobber          # Remove any generated files
rake clobber_rdoc     # Remove RDoc HTML files
rake diff_rubinius    # Diffs Rubinius HEAD with the currently checked-out copy of RDoc
rake diff_ruby        # Diffs Ruby HEAD with the currently checked-out copy of RDoc
rake generate         # Genrate all files used racc and kpeg
rake install          # Build and install rdoc-6.0.0.beta3.gem into system gems
rake install:local    # Build and install rdoc-6.0.0.beta3.gem into system gems without network access
rake rdoc             # Build RDoc HTML files
rake release[remote]  # Create tag v6.0.0.beta3 and build and push rdoc-6.0.0.beta3.gem to rubygems.org
rake rerdoc           # Rebuild RDoc HTML files
rake test             # Run tests
rake update_rubinius  # Updates Rubinius HEAD with the currently checked-out copy of RDoc
rake update_ruby      # Updates Ruby HEAD with the currently checked-out copy of RDoc
```

This change will suppress the warning.
Note: The removed `options` variable value is same as `diff_options`.
@aycabta aycabta merged commit 2f1bbb2 into ruby:master Nov 16, 2017
@aycabta
Copy link
Member

aycabta commented Nov 16, 2017

Thank you for polite comfirmation.

@pocke pocke deleted the suppress-warning branch November 16, 2017 19:02
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.

2 participants