Re: [pgAdmin4][Patch] - SonarQube Fixes - Mailing list pgadmin-hackers

From Khushboo Vashi
Subject Re: [pgAdmin4][Patch] - SonarQube Fixes
Date
Msg-id CAFOhELd0nZfCT8=TE+bFQovgyDN=GtzYPnUgz0m+L2G-+wb+5Q@mail.gmail.com
Whole thread Raw
In response to Re: [pgAdmin4][Patch] - SonarQube Fixes  (Akshay Joshi <akshay.joshi@enterprisedb.com>)
Responses Re: [pgAdmin4][Patch] - SonarQube Fixes  (Akshay Joshi <akshay.joshi@enterprisedb.com>)
List pgadmin-hackers
Hi,

Please find the attached updated patch.


On Tue, Aug 4, 2020 at 12:10 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Khushboo

As per offline discussion, multiple developers declaring the constant for the same string and error messages. To avoid that only one developer should work on this task.
Suggestions:
  • We should have a common class for Constants (which are not module specific).
Made a constant.py file which contains the common Constants. 
  • For module specific constants we should not declare them as Global variables if possible declare them as the Class variable.
  • For common error messages(if any) we can define functions in PGChildNodeView.
Already implemented. 
Please incorporate the changes send by Yogesh.   
I will send another patch for Yogesh's changes as needed more changes.

Thanks,
Khushboo

On Mon, Aug 3, 2020 at 1:36 PM Khushboo Vashi <khushboo.vashi@enterprisedb.com> wrote:
Hi,

Please find the attached patch to fix the sonarqube code smells having the rule "String literals should not be duplicated".

Thanks,
Khushboo


--
Thanks & Regards
Akshay Joshi
pgAdmin Hacker | Sr. Software Architect
EDB Postgres
Mobile: +91 976-788-8246

Attachment

pgadmin-hackers by date:

Previous
From: Akshay Joshi
Date:
Subject: Re: [pgAdmin4][Patch] - SonarQube Issues - 14 (String literals should not be duplicated, Cognitive Complexity of functions should not be too high)
Next
From: Akshay Joshi
Date:
Subject: pgAdmin 4 commit: Fixed code smell 'String literals should not be dupli