Hacker News new | ask | show | jobs
Show HN: Cloud-based Static Code Analysis for Java (code-spotter.com)
27 points by maratb 4229 days ago
3 comments

What is the benefit of this over findbugs, checkstyle, pmd, etc?
Those tools you mention are typically not interprocedural analysis. They use information that is local to the method. The analysis at Coverity is interprocedural and hence much more sophisticated.
I tried to search for information why this over Sonar and found nothing.
Sonar used to be just about running other open source tools, such as FindBugs, PMD, and Checkstyle. (BTW, Code Spotter runs FindBugs alongside Coverity analysis to complement the results). Sonar later added its own rule engine (Squid). More recently, I've come across SSLR - SonarSource Language Recognizer - which looks like a library for building custom coding rules.

Still, Coverity analyzer (which is what's behind Code Spotter) does deep interprocedural analysis and finds very different kinds of issues. I think the best way to see the difference is to try it out on a sample project.

So you have to launch it locally? Can't it observe changes on a public git repository and run it after each commit?
You can run on a hosted continuous integration service, such as Travis CI. The documentation is a little thin right now, but we will add this to the docs soon.
Why upload the code if you can git clone it?
Only if it comes from a repo that's hosted somewhere (i.e., not behind a firewall). Code Spotter is not restricted to GitHub, git, or any other particular SCM. If the code can be built, it can be analyzed.
Sure, but if the code is already hosted on a public git, it would be more convenient if you could simply clone it.
There's a bit more to it. It's not enough to point Code Spotter / Coverity to a pile of code, it needs to observe the actual build in order to know precisely what is built and how it is built. While for some projects you can extract that information from the build files (e.g., maven poms), there are cases where this will fail. (For example, when the build generates some of the source files.) The most reliable way to understand how a project is constructed is to observe an actual build.

This is particularly true for C/C++ and C#, which are not yet supported on Code Spotter, but will be in the future. This precise understanding of a project's composition is one of the many reasons Coverity false positive rate is relatively low.

It's a little strange for a Coverity product to appear as a "Show HN".
Why? It is a new product (though based on the existing technology), a new model (cloud-based vs traditional Coverity on-premise), it is in free and unlimited beta, and we are soliciting feedback. Seems like a reasonable "Show HN", no?
It is indeed a reasonable Show HN.

https://news.ycombinator.com/showhn.html.

A new feature normally wouldn't qualify. A new product is fine, as long as people are able to try it out.

Not saying it's wrong just that Show HNs aren't usually for products made by established companies.
I believe the reason he may have found it weird is that Show HN were once about weekend projects.