Обсуждение: [pgAdmin4][Patch] - SonarQube Fixes #2

Поиск
Список
Период
Сортировка

[pgAdmin4][Patch] - SonarQube Fixes #2

От
Rahul Shirsat
Дата:
Hi Hackers,

Please find the attached patch to fix the SonarQube Code smells having Rule:

  1. Define a constant instead of duplicating this literal "browser/css/node.css" 4 times.
  2. Define a constant instead of duplicating this literal "The specified table could not be found." 10 times.
  3. Define a constant instead of duplicating this literal 'get_columns_for_table.sql' 3 times.
--
Rahul Shirsat
Software Engineer | EnterpriseDB Corporation.
Вложения

Re: [pgAdmin4][Patch] - SonarQube Fixes #2

От
Akshay Joshi
Дата:
Hi Rahul

I have committed Khushboo's patch where she has introduced a new method 'not_found_error_msg', so instead of creating a new constant 'TABLE_NOT_FOUND_MSG' use self.not_found_error_msg.

Also, instead of
_NODE_CSS = ‘node.css’
_COLLECTION_CSS = ‘collection.css’

We can use the following:
_NODE_CSS = _BROWSER_CSS_PATH + ‘/node.css’
_COLLECTION_CSS = _BROWSER_CSS_PATH + ‘/collection.css’

Make the above changes and resend the patch.

On Fri, Aug 14, 2020 at 8:34 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:
Hi Hackers,

Please find the attached patch to fix the SonarQube Code smells having Rule:

  1. Define a constant instead of duplicating this literal "browser/css/node.css" 4 times.
  2. Define a constant instead of duplicating this literal "The specified table could not be found." 10 times.
  3. Define a constant instead of duplicating this literal 'get_columns_for_table.sql' 3 times.
--
Rahul Shirsat
Software Engineer | EnterpriseDB Corporation.


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

Re: [pgAdmin4][Patch] - SonarQube Fixes #2

От
Rahul Shirsat
Дата:
Hi Akshay,

Please find the updated patch attached in this email.

On Wed, Aug 19, 2020 at 2:40 PM Akshay Joshi <akshay.joshi@enterprisedb.com> wrote:
Hi Rahul

I have committed Khushboo's patch where she has introduced a new method 'not_found_error_msg', so instead of creating a new constant 'TABLE_NOT_FOUND_MSG' use self.not_found_error_msg.
 Done 

Also, instead of
_NODE_CSS = ‘node.css’
_COLLECTION_CSS = ‘collection.css’

We can use the following:
_NODE_CSS = _BROWSER_CSS_PATH + ‘/node.css’
_COLLECTION_CSS = _BROWSER_CSS_PATH + ‘/collection.css’
 Done 
 

Make the above changes and resend the patch.

On Fri, Aug 14, 2020 at 8:34 PM Rahul Shirsat <rahul.shirsat@enterprisedb.com> wrote:
Hi Hackers,

Please find the attached patch to fix the SonarQube Code smells having Rule:

  1. Define a constant instead of duplicating this literal "browser/css/node.css" 4 times.
  2. Define a constant instead of duplicating this literal "The specified table could not be found." 10 times.
  3. Define a constant instead of duplicating this literal 'get_columns_for_table.sql' 3 times.
--
Rahul Shirsat
Software Engineer | EnterpriseDB Corporation.


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



--
Rahul Shirsat
Software Engineer | EnterpriseDB Corporation.
Вложения