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

Classes with no methods still require a comment if they are defined within a class #71

Closed
kybishop opened this issue Jun 12, 2013 · 2 comments · Fixed by #72
Closed

Comments

@kybishop
Copy link

Is this intentional?

# Bar!
class Foo
  class WorldError < StandardError; end

  # I need a comment even though I have no methods =(
  class UnusedError < StandardError; end

  def bar(the_sky_is_falling = false)
    if the_sky_is_falling
      raise WorldError.new('oh noes!')
    else
      puts 'hello world!'
    end
  end
end
cane -f foo.rb

Class definitions require explanatory comments on preceding line (1):

  foo.rb:3  WorldError

Total Violations: 1
@xaviershay
Copy link
Contributor

Nope, that's a bug.

cc @chrishunt

@chrishunt
Copy link
Contributor

Dang. I'll fix that.

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 a pull request may close this issue.

3 participants