sonar-scala / sonar-scala

A free and open-source SonarQube plugin for static code analysis of Scala projects.

Home Page:https://sonar-scala.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Scalafix Support

etspaceman opened this issue · comments

It would be great if this integrated w/ Scalafix.

Thanks for opening this issue, @etspaceman.

It would be nice to integrate with the DisableSyntax syntactic rule, but as far as I know, scalafix doesn't generate any files with a report, which is what we would need to process the errors. Alternatively, we could use an API, just like we do with Scalastyle, but scalafix-core doesn't provide anything which we could use to run it in memory and collect the errors - it prints out errors to the standard output, so we would need to propose a new ScalafixReporter, which could write errors to an external file or suggest changes to expose the errors via an API.

The other syntactic and semantic rules rewrite the source code, so I don't see much point in integrating with those.

I've opened the following issue in scalafix, scalacenter/scalafix#951.