[pgAdmin][SonarQube] Fixes for 13 rules.

2020-08-03 Thread Aditya Toshniwal
Hi Hackers, Attached is the patch to fix around 27 SonarQube related issues raised for rules: 1. Remove this assignment to the local variable, the value is never used. 2. Rename local variables to match the regular expression 3. Add logic to this except clause or eliminate it and rethrow

Re: [pgAdmin4][Patch] - SonarQube Issues - 12 (String literals should not be duplicated)

2020-08-03 Thread Akshay Joshi
Hi Yogesh Instead of declaring global variables, I would suggest declaring them as a class variable (constants). Make the changes and resend the patch On Mon, Aug 3, 2020 at 10:40 AM Yogesh Mahajan < yogesh.maha...@enterprisedb.com> wrote: > Hi, > > Please find patch which fixes 15+ issues relat

pgAdmin 4 commit: Fixed SonarQube issues.

2020-08-03 Thread Akshay Joshi
Fixed SonarQube issues. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=32d904058ad2e9cdcc4eef68d462fde63486eb5e Author: Shubham Agarwal Modified Files -- web/regression/python_test_utils/test_utils.py | 227 +-

pgAdmin 4 commit: Fixed following SonarQube issues:

2020-08-03 Thread Akshay Joshi
Fixed following SonarQube issues: - Remove this assignment to the local variable, the value is never used. - Rename local variables to match the regular expression - Add logic to this except clause or eliminate it and rethrow the exception automatically. - Rename fields to match the regula

pgAdmin 4 commit: Corrected the syntax as per jinja standards. refs #56

2020-08-03 Thread Akshay Joshi
Corrected the syntax as per jinja standards. refs #5632 Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=87d08de3a0f0b0a05c0fb87151974bcef9e4bb26 Modified Files -- .../databases/schemas/tables/templates/columns/sql/10_plus/update.sq

pgAdmin 4 commit: Fixed cognitive complexity issues reported by SonarQu

2020-08-03 Thread Akshay Joshi
Fixed cognitive complexity issues reported by SonarQube. Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=eb2c5546018bc60777a3ae54be8b2f03e3b15bf4 Author: Nikhil Mohite Modified Files -- web/pgadmin/tools/maintenance/__init__.py

pgAdmin 4 commit: Improve code coverage and API test cases for Schemas.

2020-08-03 Thread Akshay Joshi
Improve code coverage and API test cases for Schemas. Fixes #5327 Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=318d712c4f1f8399b8ec2a70d32e84a1f0cfeb14 Author: Satish V Modified Files -- docs/en_US/release_notes_4_25.rst

pgAdmin 4 commit: Ensure that the original file format should be retain

2020-08-03 Thread Akshay Joshi
Ensure that the original file format should be retained when saving the same file in SQL editor. Fixes #3767 Branch -- master Details --- https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=43e127de3167311c4e65654cd1a6f2059ea14d50 Author: Yogesh Mahajan Modified Files -

Re: [pgAdmin][Patch] RM3767 - pgAdmin4 loses the file format

2020-08-03 Thread Akshay Joshi
Thanks, patch applied. On Thu, Jul 30, 2020 at 5:43 PM Yogesh Mahajan < yogesh.maha...@enterprisedb.com> wrote: > Hi, > > Please find an attached patch which enables pgAdmin to retain original > file format while saving the same file in SQL-Editor. > However, if a new file is created with the 'Sa

Re: [pgAdmin 4 - Housekeeping #5327][Code Coverage] Improve API test cases for Schemas and Catalog Objects

2020-08-03 Thread Akshay Joshi
Thanks, patch applied. On Fri, Jul 31, 2020 at 3:49 PM Satish V wrote: > Hi Hackers, > > Please find the patch which improves the code coverage for Schema alone. > Kindly create another RM for the Catalog Objects. Please review the patch. > > Thanks, > Sathish V > -- *Thanks & Regards* *Aksha

Re: Patch for SonarQube code scan fixes.

2020-08-03 Thread Akshay Joshi
Thanks, patch applied. On Fri, Jul 31, 2020 at 6:35 PM Nikhil Mohite < nikhil.moh...@enterprisedb.com> wrote: > Hi Team, > > I have fixed some code smell issues in the SonarQube scan, PFA patch. > Details as follows: > > 1. Utils Route: > >- Refactor this function to reduce its Cognitive Comp

Re: [pgAdmin][SonarQube] Fixes for 13 rules.

2020-08-03 Thread Akshay Joshi
Thanks, patch applied. On Mon, Aug 3, 2020 at 12:47 PM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi Hackers, > > Attached is the patch to fix around 27 SonarQube related issues raised for > rules: > >1. Remove this assignment to the local variable, the value is never >

Re: [pgAdmin][RM5632] Cannot specify start with value during setup of an identity column

2020-08-03 Thread Akshay Joshi
Hi Rahul Fixed the issue by modifying the condition from 'is false' to ' == false'. On Fri, Jul 31, 2020 at 12:42 PM Rahul Shirsat < rahul.shir...@enterprisedb.com> wrote: > Hi Akshay, > > A syntactical error in a jinja template caught yesterday in Yogesh's local > setup of pgAdmin by running a

[pgAdmin4][Patch] - SonarQube Fixes

2020-08-03 Thread Khushboo Vashi
Hi, Please find the attached patch to fix the sonarqube code smells having the rule "String literals should not be duplicated". Thanks, Khushboo sonarqube_fixes.patch Description: Binary data

Re: WIP: SQL Formatter

2020-08-03 Thread Aditya Toshniwal
Hi, On Fri, Jul 31, 2020 at 6:03 PM Dave Page wrote: > Hi > > Currently, all the CodeMirrors in pgAdmin use the settings from the Query >> tool -> Editor, even though they're not related. I think you're right. >> We should move all CodeMirror settings out of the Query tool and move it to >> a n

Re: WIP: SQL Formatter

2020-08-03 Thread Dave Page
On Mon, Aug 3, 2020 at 10:31 AM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi, > > On Fri, Jul 31, 2020 at 6:03 PM Dave Page wrote: > >> Hi >> >> Currently, all the CodeMirrors in pgAdmin use the settings from the Query >>> tool -> Editor, even though they're not related. I t

Re: WIP: SQL Formatter

2020-08-03 Thread Aditya Toshniwal
Hi, On Mon, Aug 3, 2020 at 3:06 PM Dave Page wrote: > > > On Mon, Aug 3, 2020 at 10:31 AM Aditya Toshniwal < > aditya.toshni...@enterprisedb.com> wrote: > >> Hi, >> >> On Fri, Jul 31, 2020 at 6:03 PM Dave Page wrote: >> >>> Hi >>> >>> Currently, all the CodeMirrors in pgAdmin use the settings f

Re: [pgAdmin4][Patch] - SonarQube Issues - 12 (String literals should not be duplicated)

2020-08-03 Thread Yogesh Mahajan
Hello, Please find the attached patch - Thanks, Yogesh Mahajan QA - Team EnterpriseDB Corporation Phone: +91-9741705709 On Mon, Aug 3, 2020 at 12:56 PM Akshay Joshi wrote: > Hi Yogesh > > Instead of declaring global variables, I would suggest declaring them as a > class variable (constants)

Re: [pgAdmin4][Patch] - SonarQube Fixes

2020-08-03 Thread Akshay Joshi
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). - For module sp