scalastyle/scalastyle — pull request #78 by mjeffryes (2014-01-09 20:51:33+00:00)
Title: Added Indentation Checker

Inspired from: https://github.com/scalastyle/scalastyle/wiki/Scalastyle-proposed-rules-(Miscellaneous)#indentation

This checker enforces two rules:
1) Every line must be indented by a multiple of the specified tab width
2) Indentation should only increase by a single tab width between two subsequent lines

Exceptions:
1) Blank lines are ignored
2) Multiline comments are indented an extra space (http://docs.scala-lang.org/style/scaladoc.html)
3) Class parameter lists may be indented more than one tab width from the opening of the class (http://docs.scala-lang.org/style/declarations.html#classes)

This checker borrows the code to replace tabs from the FileLineLengthChecker so I moved those methods into a helper class: NormalizedLine.