HairyFotr / linter

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

How does this project compare to the other Scala linters? #51

Closed RichardBradley closed 8 years ago

RichardBradley commented 8 years ago

It would be very useful to prospective users to have a section in the README discussing the other Scala linters that are available and explaining how this project relates to those and when one might choose each.

This SO answer has links to the current Scala linters: http://stackoverflow.com/a/25117125/8261

I see that you have a list of links to other Scala linters in a section starting "Rule lists from other static analysis tools", but I can't tell if this project is more or less appropriate for my needs than the alternatives.

Thanks

HairyFotr commented 8 years ago

My recommendation is to use all that you can be bothered to properly configure, as all have rules that are worthwhile. In short: ScalaStyle (mostly simple style rules), Linter & Scapegoat (collection of all bugs, optimizations, and bad practices we could think of), WartRemover (constrains scala to an opinionated subset that avoids whole classes of bugs and forces a more pure style), Abide (was meant as the new, officially supported, and extensible static analyzer, but sadly seems to have run out of steam)

There's a good, but slightly outdated talk by Leif Wickland, and I'll have a similar one at BeeScala, and there's this blog by Codacy, but to have it as a part of the README would be a bad idea, as it would be constantly out of date and biased.

RichardBradley commented 8 years ago

Thanks, that answers "when one might choose each". Do you have any thoughts that you might share on "how this project relates to those"?

HairyFotr commented 8 years ago

I think it would be possible, but my current plan is to continue maintaining Linter through Scala 2.12, and after that the compiler plugin interface is almost sure to change... I'm hoping for a new abide-like attempt led by core scala developers then, which would take the old rules, and put them into a new project.