HairyFotr / linter

Static Analysis Compiler Plugin for Scala
Apache License 2.0
268 stars 34 forks source link

Unused method parameter not discovered #28

Closed the21st closed 8 years ago

the21st commented 8 years ago

Hi! Thanks for your work on the Linter library!

This method does not raise an unused method parameter by Linter:

def foo(param1: String, param2: Int) = {
    param2 + 1
}

version: linter_2.11-0.1-SNAPSHOT

HairyFotr commented 8 years ago

There's a filter for simple methods, so if the method only contains a single expression the warning is not raised. I don't remember the reason for putting it in, so I'll run a version without the filter on a few codebases and commit, if it doesn't cause too many false positives.

Thanks for reporting!

HairyFotr commented 8 years ago

Found another linter bug with default parameters along the way, and a bug in one application, so thanks again.