5

Introducing, DeepSource for Java

 4 years ago
source link: https://deepsource.io/blog/release-java-beta/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
← All posts

Introducing, DeepSource for Java

Find and fix 170+ issues in your Java code. Currently in beta.

Header image
By Raghav on December 11, 2020

Java needs no introduction. It's been used world-wide by a majority of the software engineering world for a number of decades. As with all accessible languages, it's easy to make mistakes — even with experience — and mistakes cost time that could have been better spent.

Java has also been one of the most widely requested for languages for DeepSource, and it gives me great pleasure to announce the beta version of the Java analyzer. If you’re using DeepSource to run continuous static analysis on your code, you can start using the analyzer in your projects right away.

Why should you care?

The ecosystem around the Java programming language has been quite rich and mature, and there exist a number of static analysis tools built by the community — like SpotBugs, Error Prone, among others. So why are we asking you to use DeepSource?

DeepSource builds on top of the innovation that has already been done by the community and makes the results of static analysis more accessible and actionable to you. We guarantee less than 5% of false-positives in the issues, help you run analysis continuously on every commit and pull-request with almost zero configuration, and make the overall experience of finding and fixing quality issues in your code more enjoyable.

In the beta release, the Java analyzer detects 170+ different types of issues including performance bugs, security risks, bug risks, and anti-patterns. This initial release brings support for Gradle Java projects. Just specify the Java version that your project uses when configuring the analyzer and you’re good to go. It’s really as simple as that!

In the future, we’re adding support for Android and Maven soon, so keep an eye out! In addition, we are working on bringing Autofix support to the Java analyzer. This will let you fix reported bugs without writing a single line of code. Isn’t that exciting? ✨

Some issues detected by the Java analyzer

As of the time this post was written, the Java analyzer can detect 173 different issues spanning performance issues, security issues, potential (or definite) bugs, and anti-patterns. These issues are covered from the popular SpotBugs tool. Here are a few examples:

  • Values that are guaranteed to be dereferenced while null
  • Nullable values that are used in a way that requires them to be non-null
  • Ignoring the return value of a function with a non-void return type
  • Self-assignment to a local variable instead of a field
  • Using Map.keySet() where Map.entrySet() could have been used

How to use the Java analyzer?

You can begin using the Java analyzer by adding an entry to the [[analyzers]] table in the .deepsource.toml file for your repo. Alternatively, just activate your Java repo from the DeepSource repository dashboard after using the configration generator. Head over to the docs for a full list of configuration options available.

Sample configuration

version = 1

[[analyzers]]
name = "java"
enabled = true

  [analyzers.meta]
  runtime_version = "11"

Give it a try and tell us what you think over on Twitter! If you have any questions, you can always reach out to us on the discuss forum or the DeepSource Users group. The DeepSource Java analyzer guarantees a false positive rate of less than 5%. If you ever find a false positive in an issue detected by the analyzer, please make sure to report it. We’ll resolve it within the next 72 hours.


Recommend

  • 47
    • deepsource.io 5 years ago
    • Cache

    Package management in Go - DeepSource

    ← All postsPackage management in GoBrief overview of package management in Go — pre and post Go modules

  • 11
    • deepsource.io 3 years ago
    • Cache

    Introducing, DeepSource for Scala

    ← All postsIntroducing, DeepSource for ScalaFind and fix issues in your Scala code. Currently in beta.By Pawan on July 20, 2021Scala is one of the mo...

  • 5
    • deepsource.io 3 years ago
    • Cache

    Introducing, DeepSource for Rust

    ← All postsIntroducing, DeepSource for RustAnalyze and Autofix issues in your Rust code. Currently in beta.By Akshay on September 27, 2021Rust i...

  • 9
    • deepsource.io 3 years ago
    • Cache

    Introducing DeepSource's PHP Analyzer

    ← All postsIntroducing DeepSource's PHP AnalyzerFast and reliable static analysis for PHP is here.By Ishan on November 17, 2021We’re excited to launc...

  • 5
    • deepsource.io 3 years ago
    • Cache

    Introducing, DeepSource for C#

    Introducing, DeepSource for C# .NET is one of the most widely used developer platforms out there, especially adopted by large enterprises. It is free, cross-platform and lets you build many different types of applications for we...

  • 4
    • deepsource.io 2 years ago
    • Cache

    (Re)Introducing DeepSource

    (Re)Introducing DeepSource It has been almost four years since we first introduced DeepSource. We started with building a better static analysis platform that helps developers “ship good code.” We were...

  • 5
    • deepsource.com 2 years ago
    • Cache

    Introducing, DeepSource Reports

    Introducing, DeepSource Reports DeepSource's core focus has always been on three fundamental code health aspects: maintainability, security, and automation. To complete the loop on code health, we...

  • 8
    • deepsource.com 1 year ago
    • Cache

    Introducing, DeepSource for Swift

    All PostsIntroducing, DeepSource for SwiftJu...

  • 3
    • deepsource.com 1 year ago
    • Cache

    Introducing, DeepSource for Kotlin

    All PostsIntroducing, DeepSource for KotlinA...

  • 4
    • deepsource.com 1 year ago
    • Cache

    Introducing, DeepSource Runner

    Introducing, DeepSource RunnerWe're excited to launch DeepSource Runner, a hybrid-cloud based deployment model to run DeepSource that offers the convenience of SaaS with the security and data ownership of on-premise deployments. Thi...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK