Closed xanderdunn closed 9 years ago
I doubt it's runnable in this way, but I will check if there's something wrong with the release jars later when I'm at home... it's meant to be included into scala compilation with e.g. scalac -Xplugin:linter_2.11-0.1-SNAPSHOT.jar somesourcefile.scala
.
I clicked your profile, and saw you're adding all the analyzers to your machine learning repo - cool! :)
You actually have a build.sbt
in your project, so you can just add this to it, and it will run on every compile:
addCompilerPlugin("org.psywerx.hairyfotr" %% "linter" % "0.1.12")
To not run on every compile (since it adds some overhead), and also for usage examples of some other analyzers, there is this example repo by Leif Wickland: https://github.com/leifwickland/static-analysis-skeleton
@HairyFotr Ah, thanks. I missed the part where it should be run as a scalac plugin. I'll give that a try.
Yeah, for that project I can add it to sbt, but actually currently I'm trying to add the linter to an internal project that only uses gradle. Thanks!
I added it as a scalac flag -Xplugin:linter_2.11-0.1-SNAPSHOT.jar
to my gradle configuration and this worked well! Thanks!
I downloaded the .jar for Scala 2.11 from the link provided in the README.md and running it with
java -jar linter_2.11-0.1-SNAPSHOT.jar
gives me the errorno main manifest attribute, in linter_2.11-0.1-SNAPSHOT.jar
.