ohnosequences / nice-sbt-settings

sbt plugin with common settings for all era7/ohnosequences releases
GNU Affero General Public License v3.0
10 stars 2 forks source link

wartremover? #23

Closed eparejatobes closed 9 years ago

eparejatobes commented 10 years ago

I know this is planned #16, but I need this ASAP. We should try to get from that list the 2 or 3 critical things that we need like now and do a small release. @laughedelic ?

laughedelic commented 10 years ago

uff.. I'll try to do this and https://github.com/era7bio/scala-2.10.g8/issues/9 by the end of the week.

eparejatobes commented 10 years ago

Adding wartremover is pretty easy. What do you see as essential from #16 ?

laughedelic commented 10 years ago

I mean just that I have a lot of other stuff to do.. like scarph and the intercrossing report..

laughedelic commented 9 years ago

hi @eparejatobes.

I've added wartremover in #25, you can try 0.5.0-SNAPSHOT. There is some issue though: I can't release it now, because wartremover fails on the plugins' source... "/

eparejatobes commented 9 years ago

ok fine

laughedelic commented 9 years ago

ok, I returned to this thing. I suggest to determine the list of warts that we want to use, because some of them work not so well, some are just not that useful. Here is the list of "Unsafe" warts (those that are supposed to be stable) with some of them excluded:

With others I just haven't had any problems so far. So this list should be reconsidered in the future. Would be especially cool to add our own wart-traversals to conform the scala-guide...

@eparejatobes what do you think?

laughedelic commented 9 years ago

Also I suggest the most evil and useless things to be reported as errors instead of warnings:

Not sure about

eparejatobes commented 9 years ago

@laughedelic it's not so clear to me from what you wrote which ones fail/have issues.

laughedelic commented 9 years ago

if you turn on Wart.Any and run wartremover on the nice-sbt-settings plugin sources, you will get a compiler crash with some funny macros messages.

eparejatobes commented 9 years ago

Errors

Warnings

All else

eparejatobes commented 9 years ago

and the unit statements should be an error too, does it cause any problems?

laughedelic commented 9 years ago

I'm against of setting these as errors:

eparejatobes commented 9 years ago
laughedelic commented 9 years ago
eparejatobes commented 9 years ago

The one that crashes is NoNeedForMonad, which we don't care about anyway

eparejatobes commented 9 years ago

about ! is a really good example actually; you're dropping the exit code there into the abyss, without any good reason for doing so.

eparejatobes commented 9 years ago

about the last point, give an example where you'd end up with that kind of code and I will explain what I mean

laughedelic commented 9 years ago

about ! is a really good example actually; you're dropping the exit code there into the abyss, without any good reason for doing so.

because I don't have a convenient way to combine such calls into a chain and I don't want to write that ... } } } } } } } } code.

My point is that your suggestions are too strict. Because if we make it all errors, every our project will fail to compile. I think that warnings for some of them are enough.

eparejatobes commented 9 years ago

My take on this is: If you don't have a convenient way, either build it (pretty easy in this case) or live with the inconvenience

if all of our projects fail that's good, otherwise this WartRemover thing would be useless :) Warnings are OK in those cases where you could be forced to do that, not just because of convenience.

eparejatobes commented 9 years ago

I think we should move all this to ohnosequences/scala-guide

laughedelic commented 9 years ago

I agree

laughedelic commented 9 years ago

I think this is done in v0.5.+

laughedelic commented 9 years ago

Ok, it was with warnings, now I'm making them errors