[pgAdmin][SonarQube] Cognitive complexity roles + test cases

From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [pgAdmin][SonarQube] Cognitive complexity roles + test cases
Date: 2020-08-27 07:18:19
Message-ID: CAM9w-_=HFdix74XDDRi07pyQeyP4xUKFR5CM-qygaLkrWj5Uvg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Hackers,

Attached is the patch to reduce the cognitive complexity for
validate_request function in roles module from 258 to 15. I've also added a
few more test scenarios in the roles RE-SQL test cases to make sure the
changes are tested.

Please review.

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

Attachment Content-Type Size
sonarqube.cognitive.roles.patch application/octet-stream 35.9 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2020-08-27 07:36:26 Re: SCSS Minor SonarQube fixes
Previous Message Pramod Ahire 2020-08-27 05:54:50 SCSS Minor SonarQube fixes