Re: [pgAdmin][patch] Fixed issues reported by SonarQube

2020-06-18 Thread Dave Page
Thanks, applied. On Thu, Jun 18, 2020 at 2:17 PM Akshay Joshi wrote: > Hi Hackers > > Attached is the patch to fix almost 24 bugs of the following type: > >- TypeError can be thrown as might be null or >undefined here. >- TypeError can be thrown as this operand might have a primitiv

pgAdmin 4 commit: More code cleanup for SonarQube.

2020-06-18 Thread Dave Page
More code cleanup for SonarQube. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=bc24e3643fc9508f3f7f7f0b72e26335a312f86e Author: Akshay Joshi Modified Files -- .../misc/file_manager/static/js/select_dialogue.js | 2 +- web/pgadmi

[pgAdmin][patch] Fixed issues reported by SonarQube

2020-06-18 Thread Akshay Joshi
Hi Hackers Attached is the patch to fix almost 24 bugs of the following type: - TypeError can be thrown as might be null or undefined here. - TypeError can be thrown as this operand might have a primitive type. - The conditional operation returns the same value whether the condition

Re: [pgAdmin][patch] Sonarqube issues tagged as redundant

2020-06-18 Thread Akshay Joshi
Thanks, patch applied. On Thu, Jun 18, 2020 at 3:07 PM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi, > > The last patch committed creates a regression where setting the master > password fails. Attached is the fix. > > On Thu, Jun 18, 2020 at 11:15 AM Akshay Joshi < > akshay.

Re: [pgAdmin4][Patch] - Issue fixes reported by SonarQube - 4 (Rule Comma operator should not be used)

2020-06-18 Thread Akshay Joshi
Thanks, patch applied. On Thu, Jun 18, 2020 at 12:10 PM Yogesh Mahajan < yogesh.maha...@enterprisedb.com> wrote: > Hi, > > Please find patching and fixing issues related to "Rule *Comma operator > should not be used*" > across the project. > > > Thanks, > Yogesh Mahajan > QA - Team > Enterprise

Re: Re-[Sonarqube]- Clumsy code

2020-06-18 Thread Akshay Joshi
Thanks, patch applied. On Thu, Jun 18, 2020 at 3:21 PM Satish V wrote: > 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.jo...@enterprisedb.com> wrote: >

pgAdmin 4 commit: Replace if-then-else statement by a single return sta

2020-06-18 Thread Akshay Joshi
Replace if-then-else statement by a single return statement, issue reported by SonarQube. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=905be1d8948435fde2664002b74ef12e737854ba Author: Satish V Modified Files -- .../index_const

pgAdmin 4 commit: Fixed the master password issue, introduced in the la

2020-06-18 Thread Akshay Joshi
Fixed the master password issue, introduced in the last commit. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=a278e8b1e666fe6b0b8067f99feeab6b96b024f5 Author: Aditya Toshniwal Modified Files -- web/pgadmin/browser/static/js/brow

pgAdmin 4 commit: Fixed 'Comma operator should not be used' issue repor

2020-06-18 Thread Akshay Joshi
Fixed 'Comma operator should not be used' issue reported by SonarQube. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=6d3f13076f78c6d0b2d9e3482b19387dc1a7d74f Author: Yogesh Mahajan Modified Files -- .../browser/server_groups/ser

Re: Re-[Sonarqube]- Clumsy code

2020-06-18 Thread Satish V
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 wrote: > Hi Satish > > Fixes like below will create another code smell in SonarQube: > >- !(m.label == 'pg_global') should be

Re: [pgAdmin][patch] Sonarqube issues tagged as redundant

2020-06-18 Thread Aditya Toshniwal
Hi, The last patch committed creates a regression where setting the master password fails. Attached is the fix. On Thu, Jun 18, 2020 at 11:15 AM Akshay Joshi wrote: > Thanks, patch applied. > > On Thu, Jun 18, 2020 at 10:36 AM Aditya Toshniwal < > aditya.toshni...@enterprisedb.com> wrote: > >>

Re: Re-[Sonarqube]- Clumsy code

2020-06-18 Thread Akshay Joshi
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 a