Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFcEn-0000RR-15 for pgadmin-hackers@arkaria.postgresql.org; Tue, 08 Sep 2020 11:56:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kFcEl-00056P-VG for pgadmin-hackers@arkaria.postgresql.org; Tue, 08 Sep 2020 11:56:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFcEl-00056I-6t for pgadmin-hackers@lists.postgresql.org; Tue, 08 Sep 2020 11:56:35 +0000 Received: from mail-ed1-x543.google.com ([2a00:1450:4864:20::543]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kFcEi-0006l9-IA for pgadmin-hackers@postgresql.org; Tue, 08 Sep 2020 11:56:34 +0000 Received: by mail-ed1-x543.google.com with SMTP id q21so15714484edv.1 for ; Tue, 08 Sep 2020 04:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=NkWzXh4Q77NXlNULq7rkq13jubqmV4LfNFdtoK0QuDk=; b=fmg27DEFzxKNOI3cXoT3T912GYoUluvKzjaTue/Rd+WS0HqP2nCAH/kyXK2kfxUeLu eJHC+U+3gBHvQpqJaNwywrhFGqufji8+0AWSxj6m1Vian+2/iBP55P/VaKBNnyip2IHN S8GG6ojbIt8Nx/10r410/HJFew/jHTvdbCouTTNkrh1F/Q7UAKUZF6f0h0PnmjRlftWB //shkpn7wD/xW8viCBQ+3iyisNULJYymeVcdZx26Em+Ejk6TbYFpfjDq9h+3YYfXgLzP Zt8kIiq9jLRSPtvqaLMAvpkR6W8/vEofBf3I54f7ucFX9Ry+qTXSSAVa8wiglX8neCZc dwbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=NkWzXh4Q77NXlNULq7rkq13jubqmV4LfNFdtoK0QuDk=; b=VoxHNHI5dOVORxhExSSHJEv5UKs70Htj/kNpIwP6nguvPEOypqZ4+B4Ix2cRQwiyo6 Ij9FchVOlt6AFSAPdMA2xx1ki0/lMFY3tp4BzQuVjsT8VYj0MeJld7pwtqhuPzDPHNJY VbM312B2ojTasMzNDBqc0KDXdT1nkwc0uzwWwk+wJ+7h9XHQznwfOLNZlxHR/5XBNHB+ AHpFsnnkSzc2dm+bu/t7Bf+PjLLz0P3hGX3NfSGiyzR0D0vM/Rjg02t5C6+8oVtKEzhq RTxRtzesAXrcDqwp+V3Qr1tIO0+5BgqK6++WMzC2iFcZ9xmR2uW2DcHvptIP4VVebOgd t5Lg== X-Gm-Message-State: AOAM533JOXBXJ5t4GhmMeBBBYVoFjmlP4i0fW5Dy7HvUxXhdaBsV0Mug amGUz67SoNF7UwHXkJ7XLucqshifofiYkWYYDhp4Yg== X-Google-Smtp-Source: ABdhPJwKVVlBG7g+5cGxCJ0hgscy8yRokOG8Zg/Tcsqve1t2d1RY8ElSXtONRjl9t0ZnTb3zfqzkz7PKdFjH1x9Geso= X-Received: by 2002:a50:f28b:: with SMTP id f11mr25899623edm.44.1599566190855; Tue, 08 Sep 2020 04:56:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dave Page Date: Tue, 8 Sep 2020 12:56:19 +0100 Message-ID: Subject: Re: Patch for SonarQube code scan fixes. To: Aditya Toshniwal Cc: Nikhil Mohite , pgadmin-hackers Content-Type: multipart/alternative; boundary="00000000000099da2005aecc062d" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --00000000000099da2005aecc062d Content-Type: text/plain; charset="UTF-8" On Tue, Sep 8, 2020 at 11:40 AM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > Hi Dave, > > On Tue, Sep 8, 2020 at 3:53 PM Dave Page wrote: > >> >> 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 :-) >> > I remember Akshay had fixed all the PEP8 issues in pgcli and sent the > patch. But it was rejected by the pgcli author. :/ > Doesn't mean this one will be though - we can at least try. > >> >>> >>> 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.* >>>> *EDB Postgres* >>>> *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 >> >> > > -- > 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 --00000000000099da2005aecc062d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Sep 8, 2020 at 11:40 AM Adity= a Toshniwal <aditya= .toshniwal@enterprisedb.com> wrote:
Hi Dave,

On Tue, Sep 8, 2020 at 3:53 P= M Dave Page <dpag= e@pgadmin.org> wrote:

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

sqlautocomplete=C2=A0code is mostly inherited from the pgcli project. Ch= anging it might create trouble in updating the code with new versions.

Send a patch upstream :-)
=
I remember Akshay had fixed all the PEP8 issues i= n pgcli and sent the patch. But it was rejected by the pgcli author. :/=C2=A0

Doesn't mea= n this one will be though - we can at least try.
=C2=A0
=C2=A0

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

=
I have fixed some code smell issues in the SonarQube scan, PFA patch.<= /div>
Details as=C2=A0follows:

1.=C2=A0psycop= g2/connection:
  • Refactor this function to reduce its Cognitive C= omplexity from 32 to the 15 allowed.
  • Refactor this function to redu= ce its Cognitive Complexity from 17 to the 15 allowed.
2. psycopg2= /server_manager:
  • Refactor this function to reduce its Cognitiv= e Complexity from 20 to the 15 allowed.
  • Refactor this function to r= educe 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
<= font face=3D"verdana, sans-serif">Software Engineer.
<= a href=3D"https://www.enterprisedb.com/" target=3D"_blank">EDB Postgres
Mob.No: +91-7798364578.


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


--


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


--
--00000000000099da2005aecc062d--