Re: Re-[Sonarqube]- Clumsy code

From: Satish V <satish(dot)v(at)enterprisedb(dot)com>
To: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: Re-[Sonarqube]- Clumsy code
Date: 2020-06-18 09:51:01
Message-ID: CAOEjfmG080V9mhKWUjqTtxC48NgzucyUsipFG64FE9m+GabXxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Akshay,

Please find the updated Patch in the attachment which does not introduce
more code smell.

Thanks
Sathish V

On Thu, Jun 18, 2020 at 12:48 PM Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
wrote:

> Hi Satish
>
> Fixes like below will create another code smell in SonarQube:
>
> - !(m.label == 'pg_global') should be *(m.label != 'pg_global')*
> - !(_.isUndefined(index) || index == '');
> - !(_.has(itemData, 'label') && itemData.label === '_RETURN');
> - .....
>
> Please fix such errors correctly and resend the patch. Make sure
> functionality should work properly.
>
> On Thu, Jun 18, 2020 at 11:27 AM Satish V <satish(dot)v(at)enterprisedb(dot)com>
> wrote:
>
>> Hi Hackers,
>>
>> Please find the patch in the attachment which resolves below issue.
>> 1.Replace this if-then-else statement by a single return statement.
>>
>> Kindy review and share the changes, if required
>>
>> Thanks,
>> Sathish V
>>
>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>

Attachment Content-Type Size
if_else_reduction.patch application/octet-stream 7.1 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2020-06-18 10:48:17 pgAdmin 4 commit: Replace if-then-else statement by a single return sta
Previous Message Aditya Toshniwal 2020-06-18 09:36:45 Re: [pgAdmin][patch] Sonarqube issues tagged as redundant