Skip to content

Files

Latest commit

 

History

History
63 lines (47 loc) · 816 Bytes

Style-DocumentationMethod.md

File metadata and controls

63 lines (47 loc) · 816 Bytes

Pattern: Missing documentation for method

Issue: -

Description

This rule checks for missing documentation comment for public methods. It can optionally be configured to also require documentation for non-public methods.

Examples

# bad

class Foo
  def bar
    puts baz
  end
end

module Foo
  def bar
    puts baz
  end
end

def foo.bar
  puts baz
end

# good

class Foo
  # Documentation
  def bar
    puts baz
  end
end

module Foo
  # Documentation
  def bar
    puts baz
  end
end

# Documentation
def foo.bar
  puts baz
end

Default configuration

Attribute Value
Exclude spec/**/*, test/**/*
RequireForNonPublicMethods false

Further Reading