Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Harshad Deo
@harshad-deo
hi, the unused method parameter check does not consider usage of types defined in the parameter
specifically, this throws a warning: def buildT = new Witness[EmptyDenseSet#Include[f.ValueHash]]
`` def build[T](f: LiteralHash[T]) = new Witness[EmptyDenseSet#Include[f.ValueHash]]
HairyFotr
@HairyFotr
Thanks for reporting! I'm travelling, so my response is a bit slow, and it's hard to find time to code. Can you post a whole runnable example with a definition of the types used? It can be minimal.
Joe Sawyer
@zkay
Hello! Had a question about the FloatingPointNumericRange warning. Wondering what we might do to fix the warning, which is triggering on the following:
0.0.to(14.0).by(0.25)
Joe Sawyer
@zkay
@HairyFotr ^^ when you have time :)
HairyFotr
@HairyFotr
Hi! This check was written by @petomat, and he included a description of the problem in the code: https://github.com/HairyFotr/linter/blob/master/src/main/scala/LinterPlugin.scala#L683 Quickly looking at the warning code, it looks like it always warns. I'll have to think how to detect and filter out proper usage.
Chad Retz
@cretz
any suggestions for Comparing with == on instances of unrelated types (Integer,Int) or is it a bug? I am doing a conditional e.g. javaLib.getBoxedInteger == 0
nm, I can unbox w/ intValue since I know it will never be null
Jason Gilanfarr
@jasongilanfarr
I'm using the latest snapshot + async/await and it hits UnnecessaryElseBranch a lot
HairyFotr
@HairyFotr
@cretz it's fixed in snapshot
HairyFotr
@HairyFotr
@jasongilanfarr This warning should only come up if all other paths inside the if chain either return or throw an exception to the outside. Or in other words - the program flow shouldn't change, if you were to move the code out from the else. If that isn't true for async code, please post an example, and I'll try to fix it.
Jason Gilanfarr
@jasongilanfarr
@HairyFotr it seems like it happens in every async/await that we have in Marathon
every single one has "async { // linter:ignore UnnecessaryElseBranch"
almost all also have SuppressWarnings(Array("all")) for scapegoat too
HairyFotr
@HairyFotr
I misunderstood, I thought there was an if involved in the code. My new guess then is that there's a macro-generated If that is causing the warning - will find out soon after sbt has downloaded the entire internet :)
HairyFotr
@HairyFotr
@jasongilanfarr I've published a temp workaround. Thanks for bringing the project to my attention - it will be interesting to check all the suppressions for possible false positives.
Jason Gilanfarr
@jasongilanfarr
thanks! i'll give it a shot
HairyFotr
@HairyFotr
0.1.16 released with a few bug fixes and scala 2.12.0 build
Leif Wickland
@leifwickland
Thanks for getting a 2.12 release out, @HairyFotr
Wojtek Pituła
@Krever
Hi guys. I feel like I'm missing something. I tried to use linter, but after adding "addCompilerPlugin(...)" nothing happens. Is there anything more I have to do or some way to verify everything is ok ? I tried putting some snippets from readme in my code and no warning flashes out.
HairyFotr
@HairyFotr
@Krever Sorry, missed your message... did you add the plugin to build.sbt? Adding it to plugins.sbt seems to be a common mistake.
Wojtek Pituła
@Krever
that may be the case, I will verify this, thanks!