GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Quality: Sonar RSPEC-1940 "Boolean checks should not be inverted" · Issue #1074 · biojava/biojava

Quality: Sonar RSPEC-1940 "Boolean checks should not be inverted" #1074

New issue
Copy link
New issue
Copy link
Open
Open
Quality: Sonar RSPEC-1940 "Boolean checks should not be inverted"#1074
Copy link

Description

@jlerbsc
jlerbsc
opened on Dec 12, 2023
Issue body actions

We noticed that you have 8 violations of the Sonar rule RSPEC-1940 "Boolean checks should not be inverted". Although these violations are considered minor, they make the code less readable. Here is an example of the changes our automatic code remediation solution could bring to you. Its use is completely free for all opensource projects. You can use it without moderation.

org\biojava\nbio\structure\secstruc\SecStrucTools.java
@@ -58,5  +58,5 @@
                    if (g.hasAminoAtoms()) {
                            Object p = g.getProperty(Group.SEC_STRUC);
-                               if (!(p == null)) {
+                               if (p != null) {
                                    SecStrucInfo ss = (SecStrucInfo) p;
                                    listSSI.add(ss);

Below is another example

org\biojava\nbio\structure\align\ce\CeCalculatorEnhanced.java
@@ -1456,5  +1456,5 @@
                    //System.out.println("rmsd: " + rmsd);

-                       if(!(nAtom<strLen*0.95) && (!isRmsdLenAssigned)) {
+                       if(nAtom>=strLen*0.95 && (!isRmsdLenAssigned)) {
                            rmsdLen=rmsd;
                            isRmsdLenAssigned=true;

If you are interested you can go to the page https://indepth.fr/ and follow the links to download the indepth-cli application which is the client interface of our application. You also have several videos of less than a minute that explain how to launch your first remediation.

If you have the slightest difficulty, I will stay tuned to help you get to grips with Indepth.

Activity

  1. jlerbsc
    changed the title [-]Suggestion: Sonar RSPEC-1940 "Boolean checks should not be inverted"[/-] [+]Quality: Sonar RSPEC-1940 "Boolean checks should not be inverted"[/+] on Jan 31, 2024
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

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.