You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "abeizn (via GitHub)" <gi...@apache.org> on 2023/02/27 03:41:17 UTC

[GitHub] [incubator-devlake-website] abeizn opened a new pull request, #450: docs: sonarqube configure docs

abeizn opened a new pull request, #450:
URL: https://github.com/apache/incubator-devlake-website/pull/450

   ### ⚠️ &nbsp;&nbsp;Pre Checklist
   
   > Please complete _ALL_ items in this checklist, and remove before submitting
   
   - [ ] I have `npm run build` and `npm run serve` locally before submitting this PR
   - [ ] I have read through the [Contributing](https://devlake.apache.org/community/) Documentation
   
   # Summary
   
   sonarqube configure docs
   
   ### Does this close any open issues?
   Closes xx
   
   ### Screenshots
   Include any relevant screenshots here.
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake-website] abeizn commented on a diff in pull request #450: docs: sonarqube configure docs

Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn commented on code in PR #450:
URL: https://github.com/apache/incubator-devlake-website/pull/450#discussion_r1119887644


##########
docs/Configuration/Sonarqube.md:
##########
@@ -0,0 +1,62 @@
+---
+title: "Sonarqube"
+sidebar_position: 7
+description: Config UI instruction for Sonarqube
+---
+
+Visit config-ui: `http://localhost:4000`.
+
+### Step 1 - Add Data Connections
+
+![sonarqube-add-data-connections](/img/ConfigUI/sonarqube-add-data-connections.png)
+
+#### Connection Name
+
+Name your connection.
+
+#### Endpoint URL
+
+This should be a valid REST API endpoint
+
+- `https://YOUR_DOMAIN:YOUR_PORT/api/`
+
+The endpoint url should end with `/`.
+
+#### Auth Token(s)
+
+Sonarqube personal access tokens are required to add a connection. Learn about [how to create a Sonarqube personal access token](https://sonarqube.inria.fr/sonarqube/documentation/user-guide/user-token/).

Review Comment:
   I created a token, but I really didn't find a place with permission control



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake-website] Startrekzky commented on a diff in pull request #450: docs: sonarqube configure docs

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky commented on code in PR #450:
URL: https://github.com/apache/incubator-devlake-website/pull/450#discussion_r1119722815


##########
docs/DataModels/DevLakeDomainLayerSchema.md:
##########
@@ -496,30 +496,110 @@ A cicd_task is a single job of ci/cd.
 | `finished_date` | datetime        | 3          | when did this task finish                                       |         |
 | `environment`   | varchar         | 255        | To indicate the environment in which the task is running        |         |
 
+### Domain 5 - Code Quality
+
+#### cq_projects
+
+| **field**            | **type** | **length** | **description**                                                                     | **key** |
+| :------------------- | :------- | :--------- | :---------------------------------------------------------------------------------- | :------ |
+| `id`                 | varchar  | 255        | This key is generated based on details from the original plugin                     | PK      |
+| `name`               | varchar  | 255        | The name of the project in SonarQube                                                |         |
+| `qualifier`          | varchar  | 255        | The type of project. Examples include "TRK" for regular projects and "VW" for views |         |
+| `visibility`         | varchar  | 64         | The visibility of the project. Examples include "public" and "private"              |         |
+| `last_analysis_date` | datatime | 3          | The date and time of the most recent analysis of the project                        |         |
+| `commit_sha`         | varchar  | 128        | The SHA1 hash of the latest commit associated with the project                      |         |
+
+#### cq_issues
+
+| **field**                   | **type** | **length** | **description**                                                         | **key** |
+| :-------------------------- | :------- | :--------- | :---------------------------------------------------------------------- | :------ |
+| `id`                        | varchar  | 255        | This key is generated based on details from the original plugin         | PK      |
+| `rule`                      | varchar  | 255        | The key of the rule that the issue is violating                         |         |
+| `severity`                  | varchar  | 255        | The severity level of the issue                                         |         |
+| `component`                 | varchar  | 255        | The name of the component where the issue was found                     |         |
+| `project_key`               | varchar  | 255        | The key of the project that the issue belongs to                        |         |
+| `line`                      | bigint   |            | The line number where the issue was found                               |         |
+| `status`                    | varchar  | 255        | The status of the issue                                                 |         |
+| `message`                   | longtext |            | The message associated with the issue                                   |         |
+| `debt`                      | bigint   |            | The estimated time required to fix the issue                            |         |
+| `effort`                    | bigint   |            | The effort required to fix the issue                                    |         |
+| `commit_author_email`       | varchar  | 255        | The email address of the author of the commit that introduced the issue |         |
+| `assigne`                   | varchar  | 255        | The person assigned to fix the issue                                    |         |

Review Comment:
   typo: assignee



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake-website] abeizn merged pull request #450: docs: sonarqube configure docs

Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn merged PR #450:
URL: https://github.com/apache/incubator-devlake-website/pull/450


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake-website] Startrekzky commented on a diff in pull request #450: docs: sonarqube configure docs

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky commented on code in PR #450:
URL: https://github.com/apache/incubator-devlake-website/pull/450#discussion_r1119704938


##########
docs/Configuration/AdvancedMode.md:
##########
@@ -325,6 +326,27 @@ Below is an example for collecting a bitbucket repo.
 - `owner`: the owner of the repository.
 - `repo`: the bitbucket repository name.
 
+### 10. Sonarqube

Review Comment:
   If sonarqube does not appear in the plugin name or URL, use SonarQube.



##########
docs/Configuration/Sonarqube.md:
##########
@@ -0,0 +1,62 @@
+---
+title: "Sonarqube"
+sidebar_position: 7
+description: Config UI instruction for Sonarqube
+---
+
+Visit config-ui: `http://localhost:4000`.
+
+### Step 1 - Add Data Connections
+
+![sonarqube-add-data-connections](/img/ConfigUI/sonarqube-add-data-connections.png)
+
+#### Connection Name
+
+Name your connection.
+
+#### Endpoint URL
+
+This should be a valid REST API endpoint
+
+- `https://YOUR_DOMAIN:YOUR_PORT/api/`
+
+The endpoint url should end with `/`.
+
+#### Auth Token(s)
+
+Sonarqube personal access tokens are required to add a connection. Learn about [how to create a Sonarqube personal access token](https://sonarqube.inria.fr/sonarqube/documentation/user-guide/user-token/).

Review Comment:
   1. SonarQube personal access tokens
   2. Are there requirements for token permissions?



##########
docs/Configuration/AdvancedMode.md:
##########
@@ -325,6 +326,27 @@ Below is an example for collecting a bitbucket repo.
 - `owner`: the owner of the repository.
 - `repo`: the bitbucket repository name.
 
+### 10. Sonarqube
+
+Below is an example for collecting a sonarqube project.
+
+```json
+[
+  [
+    {
+      "plugin": "sonarqube",
+      "options": {
+        "connectionId": 1,
+        "projectKey": "testDevLake"
+      }
+    }
+  ]
+]
+```
+
+- `connectionId`: The ID of your sonarqube connection at page http://localhost:4000/connections/sonarqube.
+- `projectKey`: the project name of the sonarqube.

Review Comment:
   ProjectKey or ProjectName? If it is ProjectKey, please show users how to get it with a URL to the SonarQube doc or a screenshot.



##########
docs/DataModels/DevLakeDomainLayerSchema.md:
##########
@@ -496,30 +496,110 @@ A cicd_task is a single job of ci/cd.
 | `finished_date` | datetime        | 3          | when did this task finish                                       |         |
 | `environment`   | varchar         | 255        | To indicate the environment in which the task is running        |         |
 
+### Domain 5 - Code Quality
+
+#### cq_projects
+
+| **field**            | **type** | **length** | **description**                                                                     | **key** |
+| :------------------- | :------- | :--------- | :---------------------------------------------------------------------------------- | :------ |
+| `id`                 | varchar  | 255        | This key is generated based on details from the original plugin                     | PK      |
+| `name`               | varchar  | 255        | The name of the project in SonarQube                                                |         |
+| `qualifier`          | varchar  | 255        | The type of project. Examples include "TRK" for regular projects and "VW" for views |         |
+| `visibility`         | varchar  | 64         | The visibility of the project. Examples include "public" and "private"              |         |
+| `last_analysis_date` | datatime | 3          | The date and time of the most recent analysis of the project                        |         |
+| `commit_sha`         | varchar  | 128        | The SHA1 hash of the latest commit associated with the project                      |         |

Review Comment:
   "The SHA1 hash of the latest commit associated with the project", is this true?



##########
docs/DataModels/DevLakeDomainLayerSchema.md:
##########
@@ -496,30 +496,110 @@ A cicd_task is a single job of ci/cd.
 | `finished_date` | datetime        | 3          | when did this task finish                                       |         |
 | `environment`   | varchar         | 255        | To indicate the environment in which the task is running        |         |
 
+### Domain 5 - Code Quality
+
+#### cq_projects
+
+| **field**            | **type** | **length** | **description**                                                                     | **key** |
+| :------------------- | :------- | :--------- | :---------------------------------------------------------------------------------- | :------ |
+| `id`                 | varchar  | 255        | This key is generated based on details from the original plugin                     | PK      |
+| `name`               | varchar  | 255        | The name of the project in SonarQube                                                |         |
+| `qualifier`          | varchar  | 255        | The type of project. Examples include "TRK" for regular projects and "VW" for views |         |
+| `visibility`         | varchar  | 64         | The visibility of the project. Examples include "public" and "private"              |         |
+| `last_analysis_date` | datatime | 3          | The date and time of the most recent analysis of the project                        |         |
+| `commit_sha`         | varchar  | 128        | The SHA1 hash of the latest commit associated with the project                      |         |
+
+#### cq_issues
+
+| **field**                   | **type** | **length** | **description**                                                         | **key** |
+| :-------------------------- | :------- | :--------- | :---------------------------------------------------------------------- | :------ |
+| `id`                        | varchar  | 255        | This key is generated based on details from the original plugin         | PK      |
+| `rule`                      | varchar  | 255        | The key of the rule that the issue is violating                         |         |
+| `severity`                  | varchar  | 255        | The severity level of the issue                                         |         |
+| `component`                 | varchar  | 255        | The name of the component where the issue was found                     |         |
+| `project_key`               | varchar  | 255        | The key of the project that the issue belongs to                        |         |
+| `line`                      | bigint   |            | The line number where the issue was found                               |         |
+| `status`                    | varchar  | 255        | The status of the issue                                                 |         |
+| `message`                   | longtext |            | The message associated with the issue                                   |         |
+| `debt`                      | bigint   |            | The estimated time required to fix the issue                            |         |
+| `effort`                    | bigint   |            | The effort required to fix the issue                                    |         |
+| `commit_author_email`       | varchar  | 255        | The email address of the author of the commit that introduced the issue |         |
+| `assigne`                   | varchar  | 255        | The person assigned to fix the issue                                    |         |

Review Comment:
   type: assignee



##########
docs/DataModels/DevLakeDomainLayerSchema.md:
##########
@@ -496,30 +496,110 @@ A cicd_task is a single job of ci/cd.
 | `finished_date` | datetime        | 3          | when did this task finish                                       |         |
 | `environment`   | varchar         | 255        | To indicate the environment in which the task is running        |         |
 
+### Domain 5 - Code Quality
+
+#### cq_projects
+
+| **field**            | **type** | **length** | **description**                                                                     | **key** |
+| :------------------- | :------- | :--------- | :---------------------------------------------------------------------------------- | :------ |
+| `id`                 | varchar  | 255        | This key is generated based on details from the original plugin                     | PK      |
+| `name`               | varchar  | 255        | The name of the project in SonarQube                                                |         |
+| `qualifier`          | varchar  | 255        | The type of project. Examples include "TRK" for regular projects and "VW" for views |         |
+| `visibility`         | varchar  | 64         | The visibility of the project. Examples include "public" and "private"              |         |
+| `last_analysis_date` | datatime | 3          | The date and time of the most recent analysis of the project                        |         |
+| `commit_sha`         | varchar  | 128        | The SHA1 hash of the latest commit associated with the project                      |         |
+
+#### cq_issues
+
+| **field**                   | **type** | **length** | **description**                                                         | **key** |
+| :-------------------------- | :------- | :--------- | :---------------------------------------------------------------------- | :------ |
+| `id`                        | varchar  | 255        | This key is generated based on details from the original plugin         | PK      |
+| `rule`                      | varchar  | 255        | The key of the rule that the issue is violating                         |         |
+| `severity`                  | varchar  | 255        | The severity level of the issue                                         |         |
+| `component`                 | varchar  | 255        | The name of the component where the issue was found                     |         |
+| `project_key`               | varchar  | 255        | The key of the project that the issue belongs to                        |         |
+| `line`                      | bigint   |            | The line number where the issue was found                               |         |
+| `status`                    | varchar  | 255        | The status of the issue                                                 |         |
+| `message`                   | longtext |            | The message associated with the issue                                   |         |
+| `debt`                      | bigint   |            | The estimated time required to fix the issue                            |         |
+| `effort`                    | bigint   |            | The effort required to fix the issue                                    |         |
+| `commit_author_email`       | varchar  | 255        | The email address of the author of the commit that introduced the issue |         |
+| `assigne`                   | varchar  | 255        | The person assigned to fix the issue                                    |         |
+| `hash`                      | varchar  | 255        | A hash code for the issue                                               |         |
+| `tags`                      | varchar  | 255        | Any tags associated with the issue                                      |         |
+| `type`                      | varchar  | 255        | The type of the issue                                                   |         |
+| `scope`                     | varchar  | 128        | The scope of the issue                                                  |         |
+| `start_line`                | bigint   | 255        | The starting line of the issue                                          |         |
+| `end_line`                  | bigint   | 255        | The ending line of the issue                                            |         |
+| `start_offset`              | bigint   | 255        | The starting offset of the issue                                        |         |
+| `end_offset`                | bigint   | 255        | The ending offset of the issue                                          |         |
+| `vulnerability_probability` | varchar  | 100        | The probability of the issue being a vulnerability                      |         |
+| `security_category`         | varchar  | 100        | The security category of the issue                                      |         |
+| `creation_date`             | datetime | 3          | The date and time when the issue was created                            |         |
+| `update_date`               | datetime | 3          | The date and time when the issue was last updated                       |         |
+
+#### cq_issue_code_blocks
+
+| **field**      | **type** | **length** | **description**                                                                       | **key** |
+| :------------- | :------- | :--------- | :------------------------------------------------------------------------------------ | :------ |
+| `id`           | varchar  | 255        | This key is generated based on details from the original plugin                       | PK      |
+| `issue_key`    | varchar  | 255        | A string that stores the key of the issue that the code block is associated with      |         |
+| `component`    | varchar  | 255        | A string that stores the name of the component that the code block is associated with |         |
+| `start_line`   | bigint   | 255        | An integer that stores the line number where the code block starts                    |         |
+| `end_line`     | bigint   | 255        | An integer that stores the line number where the code block ends                      |         |
+| `start_offset` | bigint   | 255        | An integer that stores the line number where the code block ends                      |         |

Review Comment:
   Should it be "An integer that stores the offset where the code block starts"?



##########
docs/DataModels/DevLakeDomainLayerSchema.md:
##########
@@ -496,30 +496,110 @@ A cicd_task is a single job of ci/cd.
 | `finished_date` | datetime        | 3          | when did this task finish                                       |         |
 | `environment`   | varchar         | 255        | To indicate the environment in which the task is running        |         |
 
+### Domain 5 - Code Quality
+
+#### cq_projects
+
+| **field**            | **type** | **length** | **description**                                                                     | **key** |
+| :------------------- | :------- | :--------- | :---------------------------------------------------------------------------------- | :------ |
+| `id`                 | varchar  | 255        | This key is generated based on details from the original plugin                     | PK      |
+| `name`               | varchar  | 255        | The name of the project in SonarQube                                                |         |
+| `qualifier`          | varchar  | 255        | The type of project. Examples include "TRK" for regular projects and "VW" for views |         |
+| `visibility`         | varchar  | 64         | The visibility of the project. Examples include "public" and "private"              |         |
+| `last_analysis_date` | datatime | 3          | The date and time of the most recent analysis of the project                        |         |
+| `commit_sha`         | varchar  | 128        | The SHA1 hash of the latest commit associated with the project                      |         |
+
+#### cq_issues
+
+| **field**                   | **type** | **length** | **description**                                                         | **key** |
+| :-------------------------- | :------- | :--------- | :---------------------------------------------------------------------- | :------ |
+| `id`                        | varchar  | 255        | This key is generated based on details from the original plugin         | PK      |
+| `rule`                      | varchar  | 255        | The key of the rule that the issue is violating                         |         |
+| `severity`                  | varchar  | 255        | The severity level of the issue                                         |         |
+| `component`                 | varchar  | 255        | The name of the component where the issue was found                     |         |
+| `project_key`               | varchar  | 255        | The key of the project that the issue belongs to                        |         |
+| `line`                      | bigint   |            | The line number where the issue was found                               |         |
+| `status`                    | varchar  | 255        | The status of the issue                                                 |         |
+| `message`                   | longtext |            | The message associated with the issue                                   |         |
+| `debt`                      | bigint   |            | The estimated time required to fix the issue                            |         |
+| `effort`                    | bigint   |            | The effort required to fix the issue                                    |         |
+| `commit_author_email`       | varchar  | 255        | The email address of the author of the commit that introduced the issue |         |
+| `assigne`                   | varchar  | 255        | The person assigned to fix the issue                                    |         |
+| `hash`                      | varchar  | 255        | A hash code for the issue                                               |         |
+| `tags`                      | varchar  | 255        | Any tags associated with the issue                                      |         |
+| `type`                      | varchar  | 255        | The type of the issue                                                   |         |
+| `scope`                     | varchar  | 128        | The scope of the issue                                                  |         |
+| `start_line`                | bigint   | 255        | The starting line of the issue                                          |         |
+| `end_line`                  | bigint   | 255        | The ending line of the issue                                            |         |
+| `start_offset`              | bigint   | 255        | The starting offset of the issue                                        |         |
+| `end_offset`                | bigint   | 255        | The ending offset of the issue                                          |         |
+| `vulnerability_probability` | varchar  | 100        | The probability of the issue being a vulnerability                      |         |
+| `security_category`         | varchar  | 100        | The security category of the issue                                      |         |
+| `creation_date`             | datetime | 3          | The date and time when the issue was created                            |         |
+| `update_date`               | datetime | 3          | The date and time when the issue was last updated                       |         |
+
+#### cq_issue_code_blocks
+
+| **field**      | **type** | **length** | **description**                                                                       | **key** |
+| :------------- | :------- | :--------- | :------------------------------------------------------------------------------------ | :------ |
+| `id`           | varchar  | 255        | This key is generated based on details from the original plugin                       | PK      |
+| `issue_key`    | varchar  | 255        | A string that stores the key of the issue that the code block is associated with      |         |
+| `component`    | varchar  | 255        | A string that stores the name of the component that the code block is associated with |         |
+| `start_line`   | bigint   | 255        | An integer that stores the line number where the code block starts                    |         |
+| `end_line`     | bigint   | 255        | An integer that stores the line number where the code block ends                      |         |
+| `start_offset` | bigint   | 255        | An integer that stores the line number where the code block ends                      |         |
+| `end_offset`   | bigint   | 255        | An integer that stores the offset where the code block ends                           |         |
+| `msg`          | longtext |            | A long text field that stores the message associated with the code block              |         |
+
+#### cq_file_metrics

Review Comment:
   @warren830 added a few columns to this table.



##########
docs/DataModels/DevLakeDomainLayerSchema.md:
##########
@@ -496,30 +496,110 @@ A cicd_task is a single job of ci/cd.
 | `finished_date` | datetime        | 3          | when did this task finish                                       |         |
 | `environment`   | varchar         | 255        | To indicate the environment in which the task is running        |         |
 
+### Domain 5 - Code Quality
+
+#### cq_projects
+
+| **field**            | **type** | **length** | **description**                                                                     | **key** |
+| :------------------- | :------- | :--------- | :---------------------------------------------------------------------------------- | :------ |
+| `id`                 | varchar  | 255        | This key is generated based on details from the original plugin                     | PK      |
+| `name`               | varchar  | 255        | The name of the project in SonarQube                                                |         |
+| `qualifier`          | varchar  | 255        | The type of project. Examples include "TRK" for regular projects and "VW" for views |         |
+| `visibility`         | varchar  | 64         | The visibility of the project. Examples include "public" and "private"              |         |
+| `last_analysis_date` | datatime | 3          | The date and time of the most recent analysis of the project                        |         |
+| `commit_sha`         | varchar  | 128        | The SHA1 hash of the latest commit associated with the project                      |         |
+
+#### cq_issues
+
+| **field**                   | **type** | **length** | **description**                                                         | **key** |
+| :-------------------------- | :------- | :--------- | :---------------------------------------------------------------------- | :------ |
+| `id`                        | varchar  | 255        | This key is generated based on details from the original plugin         | PK      |
+| `rule`                      | varchar  | 255        | The key of the rule that the issue is violating                         |         |
+| `severity`                  | varchar  | 255        | The severity level of the issue                                         |         |
+| `component`                 | varchar  | 255        | The name of the component where the issue was found                     |         |
+| `project_key`               | varchar  | 255        | The key of the project that the issue belongs to                        |         |
+| `line`                      | bigint   |            | The line number where the issue was found                               |         |
+| `status`                    | varchar  | 255        | The status of the issue                                                 |         |
+| `message`                   | longtext |            | The message associated with the issue                                   |         |
+| `debt`                      | bigint   |            | The estimated time required to fix the issue                            |         |
+| `effort`                    | bigint   |            | The effort required to fix the issue                                    |         |
+| `commit_author_email`       | varchar  | 255        | The email address of the author of the commit that introduced the issue |         |
+| `assigne`                   | varchar  | 255        | The person assigned to fix the issue                                    |         |
+| `hash`                      | varchar  | 255        | A hash code for the issue                                               |         |
+| `tags`                      | varchar  | 255        | Any tags associated with the issue                                      |         |
+| `type`                      | varchar  | 255        | The type of the issue                                                   |         |
+| `scope`                     | varchar  | 128        | The scope of the issue                                                  |         |
+| `start_line`                | bigint   | 255        | The starting line of the issue                                          |         |
+| `end_line`                  | bigint   | 255        | The ending line of the issue                                            |         |
+| `start_offset`              | bigint   | 255        | The starting offset of the issue                                        |         |
+| `end_offset`                | bigint   | 255        | The ending offset of the issue                                          |         |
+| `vulnerability_probability` | varchar  | 100        | The probability of the issue being a vulnerability                      |         |

Review Comment:
   Where are `vulnerability_probability` and `security_category` from? Issue or hotspot API?



##########
docs/Overview/SupportedDataSources.md:
##########
@@ -9,77 +9,80 @@ sidebar_position: 5
 
 Apache DevLake(incubating) supports the following data sources. The data from each data source is collected with one or more plugins. Detailed plugin docs can be found [here](/docs/Plugins).
 
-| Data Source      | Domain(s)                                                                   | Supported Versions                   | Config UI Availability | Triggered Plugins           | Collection Mode                                                |
-|------------------|-----------------------------------------------------------------------------|--------------------------------------|------------------------|-----------------------------|----------------------------------------------------------------|
-| GitHub           | Source Code Management, Code Review, Issue Tracking, CI/CD (GitHub Actions) | Cloud                                | Available              | `github`, `gitextractor`    | Full Refresh                                                   |
-| GitLab           | Source Code Management, Code Review, Issue Tracking, CI/CD (GitLab CI)      | Cloud, Community Edition 13.x+       | Available              | `gitlab`, `gitextractor`    | Full Refresh, Incremental Sync(for `issues`,`MRs`)             |
-| Jira             | Issue Tracking                                                              | Cloud, Server 7.x+, Data Center 7.x+ | Available              | `jira`                      | Full Refresh, Incremental Sync(for `issues` and related)       |
-| Jenkins          | CI/CD                                                                       | 2.263.x+                             | Available              | `jenkins`                   | Full Refresh                                                   |
-| BitBucket (Beta) | Source Code Management, Code Review                                         | Cloud                                | Advanced Mode Available                    | `bitbucket`, `gitextractor` | Full Refresh                                                   |
-| TAPD (Beta)      | Issue Tracking                                                              | Cloud                                | Advanced Mode Available          | `tapd`                      | Full Refresh, Incremental Sync(for `stories`, `bugs`, `tasks`) |
-| Zentao (Beta)    | Issue Tracking                                                              | Cloud                                | Advanced Mode Available          | `zentao`                    | Full Refresh                                                   |
-| Gitee (WIP)      | Source Code Management, Code Review, Issue Tracking                         | Cloud                                | Not Available          | `gitee`, `gitextractor`     | Full Refresh, Incremental Sync(for `issues`,`MRs`)             |
-| PagerDuty (WIP)  | Issue Tracking                                                              | Cloud                                | Not Available          | `pagerduty`                 | Full Refresh                                                   |
-| Feishu (WIP)     | Calendar                                                                    | Cloud                                | Not Available          | `feishu`                    | Full Refresh                                                   |
-| AE               | Source Code Management                                                      | On-prem                              | Not Available          | `ae`                        | Full Refresh                                                   |
-
-
+| Data Source      | Domain(s)                                                                   | Supported Versions                   | Config UI Availability  | Triggered Plugins           | Collection Mode                                                |
+| ---------------- | --------------------------------------------------------------------------- | ------------------------------------ | ----------------------- | --------------------------- | -------------------------------------------------------------- |
+| GitHub           | Source Code Management, Code Review, Issue Tracking, CI/CD (GitHub Actions) | Cloud                                | Available               | `github`, `gitextractor`    | Full Refresh                                                   |
+| GitLab           | Source Code Management, Code Review, Issue Tracking, CI/CD (GitLab CI)      | Cloud, Community Edition 13.x+       | Available               | `gitlab`, `gitextractor`    | Full Refresh, Incremental Sync(for `issues`,`MRs`)             |
+| Jira             | Issue Tracking                                                              | Cloud, Server 7.x+, Data Center 7.x+ | Available               | `jira`                      | Full Refresh, Incremental Sync(for `issues` and related)       |
+| Jenkins          | CI/CD                                                                       | 2.263.x+                             | Available               | `jenkins`                   | Full Refresh                                                   |
+| BitBucket (Beta) | Source Code Management, Code Review                                         | Cloud                                | Advanced Mode Available | `bitbucket`, `gitextractor` | Full Refresh                                                   |
+| TAPD (Beta)      | Issue Tracking                                                              | Cloud                                | Advanced Mode Available | `tapd`                      | Full Refresh, Incremental Sync(for `stories`, `bugs`, `tasks`) |
+| Zentao (Beta)    | Issue Tracking                                                              | Cloud                                | Advanced Mode Available | `zentao`                    | Full Refresh                                                   |
+| Gitee (WIP)      | Source Code Management, Code Review, Issue Tracking                         | Cloud                                | Not Available           | `gitee`, `gitextractor`     | Full Refresh, Incremental Sync(for `issues`,`MRs`)             |
+| PagerDuty (WIP)  | Issue Tracking                                                              | Cloud                                | Not Available           | `pagerduty`                 | Full Refresh                                                   |
+| Feishu (WIP)     | Calendar                                                                    | Cloud                                | Not Available           | `feishu`                    | Full Refresh                                                   |
+| AE               | Source Code Management                                                      | On-prem                              | Not Available           | `ae`                        | Full Refresh                                                   |
+| Sonarqube        | CODE QUALITY                                                                | Community Edition v8.2+              | Available               | `sonarqube`                 | Full Refresh                                                   |

Review Comment:
   Let's use SonarQube(Server) if we're not sure if SonarQube cloud is supported.



##########
docs/DataModels/DevLakeDomainLayerSchema.md:
##########
@@ -496,30 +496,110 @@ A cicd_task is a single job of ci/cd.
 | `finished_date` | datetime        | 3          | when did this task finish                                       |         |
 | `environment`   | varchar         | 255        | To indicate the environment in which the task is running        |         |
 
+### Domain 5 - Code Quality
+
+#### cq_projects
+
+| **field**            | **type** | **length** | **description**                                                                     | **key** |
+| :------------------- | :------- | :--------- | :---------------------------------------------------------------------------------- | :------ |
+| `id`                 | varchar  | 255        | This key is generated based on details from the original plugin                     | PK      |
+| `name`               | varchar  | 255        | The name of the project in SonarQube                                                |         |
+| `qualifier`          | varchar  | 255        | The type of project. Examples include "TRK" for regular projects and "VW" for views |         |
+| `visibility`         | varchar  | 64         | The visibility of the project. Examples include "public" and "private"              |         |
+| `last_analysis_date` | datatime | 3          | The date and time of the most recent analysis of the project                        |         |
+| `commit_sha`         | varchar  | 128        | The SHA1 hash of the latest commit associated with the project                      |         |
+
+#### cq_issues
+
+| **field**                   | **type** | **length** | **description**                                                         | **key** |
+| :-------------------------- | :------- | :--------- | :---------------------------------------------------------------------- | :------ |
+| `id`                        | varchar  | 255        | This key is generated based on details from the original plugin         | PK      |
+| `rule`                      | varchar  | 255        | The key of the rule that the issue is violating                         |         |
+| `severity`                  | varchar  | 255        | The severity level of the issue                                         |         |
+| `component`                 | varchar  | 255        | The name of the component where the issue was found                     |         |
+| `project_key`               | varchar  | 255        | The key of the project that the issue belongs to                        |         |
+| `line`                      | bigint   |            | The line number where the issue was found                               |         |
+| `status`                    | varchar  | 255        | The status of the issue                                                 |         |
+| `message`                   | longtext |            | The message associated with the issue                                   |         |
+| `debt`                      | bigint   |            | The estimated time required to fix the issue                            |         |
+| `effort`                    | bigint   |            | The effort required to fix the issue                                    |         |
+| `commit_author_email`       | varchar  | 255        | The email address of the author of the commit that introduced the issue |         |
+| `assigne`                   | varchar  | 255        | The person assigned to fix the issue                                    |         |
+| `hash`                      | varchar  | 255        | A hash code for the issue                                               |         |
+| `tags`                      | varchar  | 255        | Any tags associated with the issue                                      |         |
+| `type`                      | varchar  | 255        | The type of the issue                                                   |         |
+| `scope`                     | varchar  | 128        | The scope of the issue                                                  |         |
+| `start_line`                | bigint   | 255        | The starting line of the issue                                          |         |
+| `end_line`                  | bigint   | 255        | The ending line of the issue                                            |         |
+| `start_offset`              | bigint   | 255        | The starting offset of the issue                                        |         |
+| `end_offset`                | bigint   | 255        | The ending offset of the issue                                          |         |
+| `vulnerability_probability` | varchar  | 100        | The probability of the issue being a vulnerability                      |         |
+| `security_category`         | varchar  | 100        | The security category of the issue                                      |         |
+| `creation_date`             | datetime | 3          | The date and time when the issue was created                            |         |

Review Comment:
   Shall we use `created_date` and `updated_date` for consistency?



##########
docs/DataModels/DevLakeDomainLayerSchema.md:
##########
@@ -496,30 +496,110 @@ A cicd_task is a single job of ci/cd.
 | `finished_date` | datetime        | 3          | when did this task finish                                       |         |
 | `environment`   | varchar         | 255        | To indicate the environment in which the task is running        |         |
 
+### Domain 5 - Code Quality

Review Comment:
   We can add a line here: The names of tables in the 'Code Quality' domain will start with a prefix `cq_`



##########
docs/DataModels/DevLakeDomainLayerSchema.md:
##########
@@ -496,30 +496,110 @@ A cicd_task is a single job of ci/cd.
 | `finished_date` | datetime        | 3          | when did this task finish                                       |         |
 | `environment`   | varchar         | 255        | To indicate the environment in which the task is running        |         |
 
+### Domain 5 - Code Quality
+
+#### cq_projects
+
+| **field**            | **type** | **length** | **description**                                                                     | **key** |
+| :------------------- | :------- | :--------- | :---------------------------------------------------------------------------------- | :------ |
+| `id`                 | varchar  | 255        | This key is generated based on details from the original plugin                     | PK      |
+| `name`               | varchar  | 255        | The name of the project in SonarQube                                                |         |
+| `qualifier`          | varchar  | 255        | The type of project. Examples include "TRK" for regular projects and "VW" for views |         |
+| `visibility`         | varchar  | 64         | The visibility of the project. Examples include "public" and "private"              |         |
+| `last_analysis_date` | datatime | 3          | The date and time of the most recent analysis of the project                        |         |
+| `commit_sha`         | varchar  | 128        | The SHA1 hash of the latest commit associated with the project                      |         |
+
+#### cq_issues
+
+| **field**                   | **type** | **length** | **description**                                                         | **key** |
+| :-------------------------- | :------- | :--------- | :---------------------------------------------------------------------- | :------ |
+| `id`                        | varchar  | 255        | This key is generated based on details from the original plugin         | PK      |
+| `rule`                      | varchar  | 255        | The key of the rule that the issue is violating                         |         |
+| `severity`                  | varchar  | 255        | The severity level of the issue                                         |         |
+| `component`                 | varchar  | 255        | The name of the component where the issue was found                     |         |
+| `project_key`               | varchar  | 255        | The key of the project that the issue belongs to                        |         |
+| `line`                      | bigint   |            | The line number where the issue was found                               |         |
+| `status`                    | varchar  | 255        | The status of the issue                                                 |         |
+| `message`                   | longtext |            | The message associated with the issue                                   |         |
+| `debt`                      | bigint   |            | The estimated time required to fix the issue                            |         |
+| `effort`                    | bigint   |            | The effort required to fix the issue                                    |         |
+| `commit_author_email`       | varchar  | 255        | The email address of the author of the commit that introduced the issue |         |
+| `assigne`                   | varchar  | 255        | The person assigned to fix the issue                                    |         |
+| `hash`                      | varchar  | 255        | A hash code for the issue                                               |         |
+| `tags`                      | varchar  | 255        | Any tags associated with the issue                                      |         |
+| `type`                      | varchar  | 255        | The type of the issue                                                   |         |
+| `scope`                     | varchar  | 128        | The scope of the issue                                                  |         |
+| `start_line`                | bigint   | 255        | The starting line of the issue                                          |         |
+| `end_line`                  | bigint   | 255        | The ending line of the issue                                            |         |
+| `start_offset`              | bigint   | 255        | The starting offset of the issue                                        |         |
+| `end_offset`                | bigint   | 255        | The ending offset of the issue                                          |         |
+| `vulnerability_probability` | varchar  | 100        | The probability of the issue being a vulnerability                      |         |
+| `security_category`         | varchar  | 100        | The security category of the issue                                      |         |
+| `creation_date`             | datetime | 3          | The date and time when the issue was created                            |         |
+| `update_date`               | datetime | 3          | The date and time when the issue was last updated                       |         |
+
+#### cq_issue_code_blocks
+
+| **field**      | **type** | **length** | **description**                                                                       | **key** |
+| :------------- | :------- | :--------- | :------------------------------------------------------------------------------------ | :------ |
+| `id`           | varchar  | 255        | This key is generated based on details from the original plugin                       | PK      |
+| `issue_key`    | varchar  | 255        | A string that stores the key of the issue that the code block is associated with      |         |
+| `component`    | varchar  | 255        | A string that stores the name of the component that the code block is associated with |         |
+| `start_line`   | bigint   | 255        | An integer that stores the line number where the code block starts                    |         |
+| `end_line`     | bigint   | 255        | An integer that stores the line number where the code block ends                      |         |
+| `start_offset` | bigint   | 255        | An integer that stores the line number where the code block ends                      |         |
+| `end_offset`   | bigint   | 255        | An integer that stores the offset where the code block ends                           |         |
+| `msg`          | longtext |            | A long text field that stores the message associated with the code block              |         |
+
+#### cq_file_metrics
+
+| **field**                    | **type** | **length** | **description**                                                  | **key** |
+| :--------------------------- | :------- | :--------- | :--------------------------------------------------------------- | :------ |
+| `id`                         | varchar  | 255        | This key is generated based on details from the original plugin  | PK      |
+| `project_key`                | varchar  | 255        | The key of the project that the issue belongs to                 | PK      |
+| `file_name`                  | longtext |            | longtext fields that store the name of the file                  |         |
+| `file_path`                  | longtext |            | longtext fields that store the path of the file                  |         |
+| `file_language`              | longtext |            | longtext fields that store the language of the file              |         |
+| `code_smells`                | bigint   |            | numeric fields that store various metrics of the file            |         |

Review Comment:
   1. The description can be updated to: Code smells of this file.
   2. Same goes to the description below



##########
docs/Plugins/sonarqube.md:
##########
@@ -0,0 +1,56 @@
+---
+title: "Sonarqube"
+description: >
+  Sonarqube Plugin
+---
+
+## Summary
+
+This plugin collects Sonarqube data through its REST APIs. SonarQube is a tool for static code analysis and code quality management. It can help you discover potential problems and defects in your code, and provide suggestions and solutions.
+
+## Entities
+
+Check out the [Sonarqube entities](/Overview/SupportedDataSources.md#data-collection-scope-by-each-plugin) collected by this plugin.
+
+## Data Refresh Policy
+
+Check out the [data refresh policy](/Overview/SupportedDataSources.md#sonarqube) of this plugin.
+
+## Metrics
+
+Metrics that can be calculated based on the data collected from Sonarqube:

Review Comment:
   Update with: Most of SonarQube metrics are collected and can be found in DevLake's SonarQube dashboard.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-devlake-website] Startrekzky commented on a diff in pull request #450: docs: sonarqube configure docs

Posted by "Startrekzky (via GitHub)" <gi...@apache.org>.
Startrekzky commented on code in PR #450:
URL: https://github.com/apache/incubator-devlake-website/pull/450#discussion_r1120218298


##########
docs/Configuration/AdvancedMode.md:
##########
@@ -325,6 +326,32 @@ Below is an example for collecting a bitbucket repo.
 - `owner`: the owner of the repository.
 - `repo`: the bitbucket repository name.
 
+### 10. SonarQube
+
+Below is an example for collecting a SonarQube project.
+
+```json
+[
+  [
+    {
+      "plugin": "sonarqube",
+      "options": {
+        "connectionId": 1,
+        "projectKey": "testDevLake"
+      }
+    }
+  ]
+]
+```
+
+- `connectionId`: The ID of your SonarQube connection at page http://localhost:4000/connections/sonarqube.
+- `projectKey`: the project name of the SonarQube. To find the project key in SonarQube, you can follow these steps:

Review Comment:
   The project key of the SonarQube. To find the project key in SonarQube, please follow the steps:



##########
docs/DataModels/DevLakeDomainLayerSchema.md:
##########
@@ -612,29 +700,29 @@ metrics, such as _'No. of Issue closed by contributor', 'No. of commits by contr
 
 #### project
 
-|   **field**   | **type** | **length** | **description**               | **key** |
-| ------------- | -------- | ---------- | ----------------------------- | ------- |
-| `name`        | varchar  | 255        | name for project              | PK      |
-| `description` | longtext |            | description of the project    |         |
-| `created_at`  | datetime | 3          | created time of project       |         |
-| `updated_at`  | datetime | 3          | last updated time of project  |         | 
+| **field**     | **type** | **length** | **description**              | **key** |
+| ------------- | -------- | ---------- | ---------------------------- | ------- |
+| `name`        | varchar  | 255        | name for project             | PK      |
+| `description` | longtext |            | description of the project   |         |
+| `created_at`  | datetime | 3          | created time of project      |         |

Review Comment:
   Shall we use `created_date` and `updated_date`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org