dwango/scalastyle — pull request #13 by suikwasha (2013-08-20 05:28:04+00:00)
Title: RemovableMatchChecker miss detects some variables as check target

RemovableMatchChecker detects the expressions where able to remove `match` word.
I read the source code and I found a bug when deciding expression has removable `match`

RemovableMatchChecker checks the expression when its method name is listed in `targetCalls`
but, RemovableMatchChecker miss detects variable as target `CallExpr` when the variable's name is listed in `targetCalls`

For example, the checker miss detects if there is a variable named `count`

val count = 1
val foo = count + count

In Scala collections framework, method `count` requires argument. but, variable `count` has no arguments
RemovableMatchChecker fails when accessing to empty argument list element.

I fixed this bug by adding checking argument length.