Skip to content

Files

Latest commit

 

History

History
53 lines (39 loc) · 945 Bytes

Layout-AccessModifierIndentation.md

File metadata and controls

53 lines (39 loc) · 945 Bytes

Pattern: Malformed indentation for access modifier

Issue: -

Description

Modifiers should be indented as deep as method definitions, or as deep as the class/module keyword, depending on configuration.

Examples

# EnforcedStyle: indent (default)

# bad
class Plumbus
private
  def smooth; end
end

# good
class Plumbus
  private
  def smooth; end
end

# EnforcedStyle: outdent

# bad
class Plumbus
  private
  def smooth; end
end

# good
class Plumbus
private
  def smooth; end
end

Default configuration

Attribute Value
EnforcedStyle indent
SupportedStyles outdent, indent
IndentationWidth

Further Reading