Re: Patch for SonarQube code scan fixes. - Mailing list pgadmin-hackers

From Dave Page
Subject Re: Patch for SonarQube code scan fixes.
Date
Msg-id CA+OCxozngZBtnsQywQJ+rnUp-scXmYmzCeFoxQ9oZtvY5MxW4g@mail.gmail.com
Whole thread Raw
In response to Re: Patch for SonarQube code scan fixes.  (Aditya Toshniwal <aditya.toshniwal@enterprisedb.com>)
Responses Re: Patch for SonarQube code scan fixes.
List pgadmin-hackers

On Tue, Sep 8, 2020 at 11:01 AM Aditya Toshniwal <aditya.toshniwal@enterprisedb.com> wrote:
Hi,

sqlautocomplete code is mostly inherited from the pgcli project. Changing it might create trouble in updating the code with new versions.

Send a patch upstream :-)
 

On Tue, Sep 8, 2020 at 2:59 PM Nikhil Mohite <nikhil.mohite@enterprisedb.com> wrote:
Hi Team,

I have fixed some code smell issues in the SonarQube scan, PFA patch.
Details as follows:

1. psycopg2/connection:
  • Refactor this function to reduce its Cognitive Complexity from 32 to the 15 allowed.
  • Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.
2. psycopg2/server_manager:
  • Refactor this function to reduce its Cognitive Complexity from 20 to the 15 allowed.
  • Refactor this function to reduce its Cognitive Complexity from 33 to the 15 allowed.
  • Refactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.
3. sqlautocomplete/parseutils:
  • Refactor this function to reduce its Cognitive Complexity from 23 to the 15 allowed.


--
Thanks & Regards,
Nikhil Mohite
Software Engineer.
Mob.No: +91-7798364578.


--
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | edbpostgres.com
"Don't Complain about Heat, Plant a TREE"


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: http://www.enterprisedb.com

pgadmin-hackers by date:

Previous
From: Aditya Toshniwal
Date:
Subject: Re: Patch for SonarQube code scan fixes.
Next
From: Aditya Toshniwal
Date:
Subject: Re: Patch for SonarQube code scan fixes.