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 1kFb3e-0005cN-QA for pgadmin-hackers@arkaria.postgresql.org; Tue, 08 Sep 2020 10:41:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kFb3d-0007pw-D9 for pgadmin-hackers@arkaria.postgresql.org; Tue, 08 Sep 2020 10:41:01 +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 1kFb3d-0007pp-0C for pgadmin-hackers@lists.postgresql.org; Tue, 08 Sep 2020 10:41:01 +0000 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kFb3Z-00062O-Q8 for pgadmin-hackers@postgresql.org; Tue, 08 Sep 2020 10:40:59 +0000 Received: by mail-ed1-x544.google.com with SMTP id b12so15448925edz.11 for ; Tue, 08 Sep 2020 03:40:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Mojj2BrPhtmC3MUWJbezcayRKCz8Ob11DzXQIZjRLNg=; b=xdNiXD083dzhNYgT4y4aRqFFpb2g5Kr5CSFw3QM4Qg++Egy/85Hge26T8GAa9T/cqu 03UvDRUCnBUHfrb3z8FMaSwEj0Vi+WLNY/ZphWhYxz3JF/dKl/QHj1dnM8btnLYzcLUo RUskKlDOUCs1/Fe9EP4xyC8Kb2aZVZdAEAa8IevQjdpPE7X3i1XtpAYgtv+O7wnXOtNx EgOs9C6HIMGOsW+it1MWkZCpDwq5qX4B8kPzN+8fdBA89yHthdWha6UwZ0Jh01tzpTbS UrDbXJm1wd2LrgEhKZHXmhFZFj3e/t4okYHRKhEefMqdZfYJELCS+E7u88W6R3j9FYlL e9QQ== 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=Mojj2BrPhtmC3MUWJbezcayRKCz8Ob11DzXQIZjRLNg=; b=jAYYm7bZgLVGh5hsuE7ygSlRSjUamkR+sLiJjLvNagwcCktMkLxwcsqxpyp4+fZLeS kx2Z44b+YiJNf7pEqHRkM+IWsB2yYOq4MiRRhoLK4pPDHZhAA8H1lrqhf+cdIR06U8e0 lNd6+mU3PklC23Y0adNjH8eizeedATeOkphXAjWDCtOD3ImZP1hIPUFs5K5sxB/QLkyQ OJuvbsY0RP0Bkdcq8q+2SCDjfKW3cou53tkAWAm/G4cCNu20Du0HbpEfcAGGRaEK6MTZ nhYTooF30VMTAIgoc4EIGf9SSFo2WF4AszO+loayFPK1Gp7sIB2Z4FKFrbagLSNr23t7 hBuA== X-Gm-Message-State: AOAM532fezuiNVQec/7wc2Ya/Nmrz9ptJkEtQUiJ9VWPufH3+jThf/Vo PiT/05n6guWsXKK/w8J5DT0NbcMAu6Pdzj+MuQC6GHgKGREG1xhsuitbCDESst9pXnEhh0BUAHi xRtyhM8Rf9eZ3goYDIMNspR9w+ExLJ4P1x7RsuuruSkpyrr+MmPxbi1Un44X1of0EOStqwTHAta ChxckI+U5kn8dkrjEsuySuQ63/WN5uGKNQ7WEYas9aNQMj6IDfUv5r2faK2YMbonfQzw== X-Google-Smtp-Source: ABdhPJw4Ph11Nj2dmGX0anmzlWmr5q+FXZuYkboN83GRZW8ST0YaJrzjvn+jNuClUc5WRzvfvAOivHR3LHtVoUyjth4= X-Received: by 2002:aa7:cc14:: with SMTP id q20mr25719656edt.309.1599561656101; Tue, 08 Sep 2020 03:40:56 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aditya Toshniwal Date: Tue, 8 Sep 2020 16:10:18 +0530 Message-ID: Subject: Re: Patch for SonarQube code scan fixes. To: Dave Page Cc: Nikhil Mohite , pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000004f337f05aecaf864" X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000004f337f05aecaf864 Content-Type: text/plain; charset="UTF-8" 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. :/ > > >> >> 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" --0000000000004f337f05aecaf864 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Dave,

On Tue, Sep 8, 2020 at 3:53 PM D= ave Page <dpage@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. Changing it might creat= e trouble in updating the code with new versions.
<= div>
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. :/=C2=A0
=C2=A0

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

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

1.=C2=A0psycopg2/connection:
    =
  • Refactor this function to reduce its Cognitive Complexity from 32 to th= e 15 allowed.
  • Refactor this function to reduce its Cognitive Comple= xity from 17 to the 15 allowed.
2. psycopg2/server_manager:
<= ul>
  • Refactor this function to reduce its Cognitive Complexity from 20 to= the 15 allowed.
  • Refactor this function to reduce its Cognitive Com= plexity from 33 to the 15 allowed.
  • Refactor this function to reduce= its Cognitive Complexity from 26 to the 15 allowed.
  • 3. sqlautocom= plete/parseutils:
    • Refactor this function to reduce its Cognitiv= e Complexity from 23 to the 15 allowed.


    --
    Thanks & Regards,
    Nikhil Mohite
    Software Engineer.
    = 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. Softwa= re Engineer | edbpostgres.com<= /font>
    "Don't Complain about Heat, Plant a TREE&qu= ot;
    --0000000000004f337f05aecaf864--