ExplicitResultTypes
that automatically inserts the inferred type annotations on public members https://scalacenter.github.io/scalafix/docs/rules/ExplicitResultTypes.html I use it in several of my projects and it's worked pretty well in my experience
@rfan-debug no worries, I tried using wart remover v2.3.7 with sbt 0.13.8 and scala 2.11.11..works fine for me (refer this https://github.com/wartremover/wartremover/blob/da1e629e3367c0ec/docs/_posts/2017-02-11-install-setup.md)
Thank you! that's really helpful!
toString
and StringPlusAny
with wartremover. It works well, but we use a lot of integer/long/etc for metrics log, I get tons (several hundreds) of warning, which make it almost unusable. I would like to know if there is a way to tell wartremover "except integer"?
Hi, I am having a hard time trying to exclude files. As per the docs, I can use wartremoverExcluded
.
However this doesn't work:
lazy val wartremoverSettings = Seq(
wartremoverWarnings in (Compile, compile) ++= Warts.allBut(Wart.Throw),
wartremoverExcluded ++= Seq(
sourceManaged.value,
baseDirectory.value / "common" / "src" / "main" / "scala" / "com" / "tango" / "charlie" / "clients" / "Github.scala"
)
)
Any pointer would help, Thank you.
Hi folks, I’m having issues with wartRemover
working in vsCode / metals. It does work normally when I compile, but, when metals compiles it via bloop, I get this errors in metals.log
:
ERROR bad option: -P:wartremover:only-warn-traverser:org.wartremover.warts.Any
sbt 1.4.4
scala 2.13.4
I’ve added
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "2.4.13”)
in project/plugins.sbt
and
ThisBuild / wartremoverErrors ++= Warts.unsafe
in build.sbt
Equals
wart that it also warns on Strings. Can I stop wart remover warning about String comparisons or is this an opinionated thing? i.e. Wartremover is implying I should wrap all my Strings in other types
Hello guys
I've implemented custom wart and try to use it in the same project - have compilation error sayingscala.ScalaReflectionException: object com.{org}.warts.MyWart not found
I'm connecting it via settings:
lazy val wartSettings = Seq(
Compile / compile / wartremoverErrors ++= Seq(Wart.custom("com.{org}.warts.MyWart"))
)
is it a limitation or there is a workaround?
@DCameronMauch This is an IntelliJ issue. I was fixing it earlier by downgrading 2.4.13 to 2.4.10.
This is fixed already by IntelliJ. I raised an issue there some time ago.
May current working setup is SBT 1.5.2, Wartremover 2.4.13, IntelliJ 2021.1.1 with the latest Scala plugin.
All is fine.
Opened an issue for that on Github
If this issue was opened for Wartremover I would suggest to close it, as it is not valid due to above mentioned fix in IntelliJ.
scalac: bad option: -P:wartremover:traverser:org.wartremover.warts.AsInstanceOf
I am sure I have solved this one before, but I cannot remember, how to fix this?