Comments (3)
FindBugs is not designed to analyse Scala code, I'd suggest you use something like https://github.com/scalastyle/scalastyle on your Scala code, and only run FindBugs on your Java code.
from sbt-findbugs.
I'd suggest you use something like scalastyle on your Scala code, and only run FindBugs on your Java code.
Scalastyle is a regex based rule engine; it's not really comparable to FindBugs. It's closer to a source code formatter.
A closer equivalent is scapegoat.
There is some discussion on scapegoat-scala/scapegoat#38 about Findbugs v.s. Scapegoat.
I believe that there may be some useful knowledge about the Java standard libraries in Findbugs which may be applicable to Scala programs, but many of the rules are inapplicable, you are right.
If the general conclusion is that Findbugs is completely inapplicable to Scala, then findbugs4sbt
should run only on Java sources -- currently it does try to run Findbugs on bytecode from Scala sources.
from sbt-findbugs.
I wouldn't say scalastyle is regex - it parses the Scala AST and applies rules to that. But it doesn't really do any static analysis, you're right.
This StackOverflow post also has some alternates: http://stackoverflow.com/questions/22617713/whats-the-current-state-of-static-analysis-tools-for-scala
If the general conclusion is that Findbugs is completely inapplicable to Scala, then findbugs4sbt should run only on Java sources -- currently it does try to run Findbugs on bytecode from Scala sources.
Personally I think it is and would vote to change it, although I can't speak for the project maintainers
FindBugs works "out of the box" for Java, and the rules it has detect issues with commonly written Java code.
This isn't the case for Scala, and I would argue the changes to support it are out of the scope of this project. Scala support should be added to the main FindBugs tool (or an extension of it) so that things like running it directly from the command line work, not in an SBT plugin.
from sbt-findbugs.
Related Issues (16)
- Java play 2.2.X application with findbugs4sbt does not generate Html report HOT 1
- Version 1.4.0 has not been deployed HOT 9
- Introduce findbug failOnError property available to ant task. HOT 2
- Documentation about how to use it.
- correct syntax for findbugsReportPath? HOT 3
- Upgrade to Findbugs 3.0.1
- Cut new release HOT 1
- FindbugsReportType -> FindbugsReport in docs
- Can't generate HTML output.
- README devoid of clear working examples
- Travis CI dropped
- Include findbugs-contrib rules HOT 2
- Create a cross build for both 2.11 and 2.10 HOT 1
- Add support for auto plugins in sbt 0.13.5 HOT 2
- Add suport for Findbugs 3.0 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sbt-findbugs.