⚡ Sangsakala Proxy 🏠 Home
Skip to content

For your information, code remediation via indepth-cli is completely free for open source projects #1072

Closed

Description

@jlerbsc

We suggested code changes corresponding to defects listed by SonarQube.

#1067
#1065
#1062
#1052

Today we offer all Open source projects the opportunity to use our solution for free, to detect and correct issues in your project yourself. Everything you need to do is explained here https://github.com/javaperf-consulting/indepth

We hope this solution can help you improve the quality of your solution.

Please share your suggestions/comments to help us improve indepth-cli.

Activity

  1. tejdnk-2019-ShortNotes commented on Dec 2, 2023

    @tejdnk-2019-ShortNotes

    OK

  2. jlerbsc commented on Dec 4, 2023

    @jlerbsc
    ContributorAuthor

    For example, in the latest version of the project, there are 14 issues that violate the Sonar rule "Exception handlers should preserve the original exception" (S1166). This is an issue because you lose the original exception which makes it more difficult to troubleshoot.

    Below is a snippet of the type of correction that our solution can provide in this case.

    org\biojava\nbio\alignment\io\StockholmFileParser.java
    @@ -501,5 +501,5 @@
    // TODO: Best practice is to catch or throw Exception, never both
    logger.error("IOException: ", e);
    - throw new IOException("Error parsing Stockholm file");
    + throw new IOException("Error parsing Stockholm file", e);
    }
    StockholmStructure structure = this.stockholmStructure;

    All you have to do is go to the site https://indepth.fr/ then follow the “download” link. On the project's github page you have 3 videos of less than a minute which succinctly explain how to get started with Indepth. Basically the first time you use it there are 4 steps.
    Downloading the client application;
    Opening an account and initializing the project;
    The choice of a type of fix (a Sonar rule);
    Then execution either in a dry-run mode or by requesting the application of patches.

    If you encounter any difficulty, simply open an issue and we will assist you in using the product. Please note that it is also free to use for all open source projects.

  3. jlerbsc commented on Dec 4, 2023

    @jlerbsc
    ContributorAuthor

    We also noticed that you had 100 violations of the "logging arguments should not require evaluation" rule. This violation is important because it could cause performance problems related to the concatenation of character strings in the logs. You will find detailed explanations on this page (https://rules.sonarsource.com/java/RSPEC-2629/).

    Below is a snippet of the type of correction that our solution can provide in this case.

    org\biojava\nbio\structure\xtal\CrystalBuilder.java
    @@ -281,5 +281,5 @@
    int auTrials = (numPolyChainsAu*(numPolyChainsAu-1))/2;
    int trials = numPolyChainsAunumOperatorsSgnumPolyChainsAu*neighbors;
    - logger.debug("Chain clash trials within original AU: "+auTrials);
    + logger.debug("Chain clash trials within original AU: {}", auTrials);

    Furthermore, Sonar estimates the average correction time for an issue of this type to be 5 minutes. In your case it would take about 8 hours of hard work to complete it. With Indepth it will only take you a few minutes if we consider the time needed to initialize your project in our solution.

    Improving the quality of your Java source code has never been easier, faster and more efficient.

  4. josemduarte commented on Mar 5, 2024

    @josemduarte
    Contributor

    Closing because this is not an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions