Skip to content

Files

Latest commit

 

History

History
59 lines (47 loc) · 892 Bytes

Layout-IndentationWidth.md

File metadata and controls

59 lines (47 loc) · 892 Bytes

Pattern: Malformed indentation width

Issue: -

Description

This rule checks for indentation that doesn't use the specified number of spaces.

Examples

# bad, Width: 2
class A
 def test
  puts 'hello'
 end
end

# bad, Width: 2,
       IgnoredPatterns:
         - '^\s*module'
module A
class B
  def test
  puts 'hello'
  end
end
end

# good, Width: 2
class A
  def test
    puts 'hello'
  end
end

# good, Width: 2,
        IgnoredPatterns:
          - '^\s*module'
module A
class B
  def test
    puts 'hello'
  end
end
end

Default configuration

Attribute Value
Width 2
IgnoredPatterns

Further Reading