From d0bfb739957dfece602acc3031b67d435b9c0cf0 Mon Sep 17 00:00:00 2001 From: Wener Date: Tue, 4 Jun 2024 16:50:43 +0200 Subject: [PATCH 01/18] Update README.md --- README.md | 34 ++++++---------------------------- 1 file changed, 6 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 34e4e2a5..ca985267 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Tests](https://github.com/tiobe/tics-github-action/actions/workflows/test.yml/badge.svg)](https://github.com/tiobe/tics-github-action/actions/workflows/test.yml) [![CodeQL](https://github.com/tiobe/tics-github-action/actions/workflows/codeql.yml/badge.svg)](https://github.com/tiobe/tics-github-action/actions/workflows/codeql.yml) -The TICS Github action integrates TICS Client analysis to measure your code quality. The incorporated Quality gating feature enables you to analyze and decorate pull requests. +The TICS Github action integrates TICS analysis analysis to measure your code quality. The incorporated Quality gating feature enables you to analyze and decorate pull requests. ## Before you start @@ -19,13 +19,12 @@ The TICS Github action integrates TICS Client analysis to measure your code qual - macOS runners (GitHub-hosted or self-hosted) are not yet supported. - The connected runner should have Git installed. -## Usage v3 - Add the `TICS GitHub Action` to your workflow to launch TICS code analysis and post the results of Quality Gating feature as part of your pull request. Below are some example of how to include the `TICS GitHub Action` step as part of your workflow. ### Client (default) -The default mode to run is [TICS Client](https://ticsdocumentation.tiobe.com/latest/docs/#doc=user/enduser.html). In this mode the project can be either the project of the project to run or "project auto" (omit the project variable), in which mode TICS will figure out what project(s) are being run. +The default mode to run is [TICS Client](https://ticsdocumentation.tiobe.com/latest/docs/#doc=user/enduser.html). In this mode, the commit or pull request will be evaluated. The quality gate determines wether the commit or pull request qualifies for delivery. +The quality gate and measurement results are reported in your action summary and optionally the pull request can be decorated. ```yaml on: [pull_request] @@ -38,7 +37,6 @@ jobs: - name: TICS GitHub Action uses: tiobe/tics-github-action@v3 with: - project: project-name viewerUrl: https://domain.com/tiobeweb/TICS/api/cfg?name=config ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }} installTics: true @@ -46,7 +44,9 @@ jobs: ### QServer -As of v3 the option to do [TICSQServer](https://ticsdocumentation.tiobe.com/latest/docs/#doc=admin/admin_A3_qserverref.html) analyses has been available. In this mode the project has to be set and project "auto" is not available. +As of v3, the option to run [TICSQServer](https://ticsdocumentation.tiobe.com/latest/docs/#doc=admin/admin_A3_qserverref.html) analyses has been made available. +With TICSQServer, persistent measurement points are created which are stored in your Quality Database. These measurement points are used by the Client to determine how the code quality evolved from that point. +TICSQServer can also compare the last obtained results with the previous run and apply Quality Gating. ```yaml on: [pull_request] @@ -87,28 +87,6 @@ jobs: installTics: true ``` -### Usage v2 - -Add the `TICS GitHub Action` to your workflow to launch TICS code analysis and post the results of Quality Gating feature as part of your pull request. -Below is an example of how to include the `TICS GitHub Action` step as part of your workflow: - -```yaml -on: [pull_request] - -jobs: - TICS: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: TICS GitHub Action - uses: tiobe/tics-github-action@v2 - with: - projectName: project-name - ticsConfiguration: https://domain.com/tiobeweb/TICS/api/cfg?name=config - ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }} - installTics: true -``` - ### Supported Platforms Linux and Windows based runners, both Github-hosted and self-hosted, are supported. From 73ca549b81e99f846dd71b61849df06bc01d048c Mon Sep 17 00:00:00 2001 From: Wener Date: Tue, 4 Jun 2024 16:52:00 +0200 Subject: [PATCH 02/18] Update README.md Removed superflous "analysis" --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ca985267..da5f54df 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Tests](https://github.com/tiobe/tics-github-action/actions/workflows/test.yml/badge.svg)](https://github.com/tiobe/tics-github-action/actions/workflows/test.yml) [![CodeQL](https://github.com/tiobe/tics-github-action/actions/workflows/codeql.yml/badge.svg)](https://github.com/tiobe/tics-github-action/actions/workflows/codeql.yml) -The TICS Github action integrates TICS analysis analysis to measure your code quality. The incorporated Quality gating feature enables you to analyze and decorate pull requests. +The TICS Github action integrates TICS analysis to measure your code quality. The incorporated Quality gating feature enables you to analyze and decorate pull requests. ## Before you start From b0c3c7cdcf1e6c869ef63f022e8f0921fb6e14b9 Mon Sep 17 00:00:00 2001 From: Wener Date: Tue, 4 Jun 2024 17:39:10 +0200 Subject: [PATCH 03/18] Update README.md Restructured the documentation. Separated analysis modes and made them more self-contained --- README.md | 125 ++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 83 insertions(+), 42 deletions(-) diff --git a/README.md b/README.md index da5f54df..38628060 100644 --- a/README.md +++ b/README.md @@ -7,25 +7,27 @@ The TICS Github action integrates TICS analysis to measure your code quality. The incorporated Quality gating feature enables you to analyze and decorate pull requests. ## Before you start - ### Prerequisites +A TICS Viewer (version 2022.4 or higher) running somewhere on the network that is HTTP(S) accessible by the runner on which you want to execute the action. -- A TICS Viewer (version 2022.4 or higher) running somewhere on the network that is HTTP(S) accessible by the runner on which you want to execute the action. +### Supported Platforms +Linux and Windows based runners, both Github-hosted and self-hosted, are supported. ### Action Restrictions - - It is not working for forked repositories. - It is not working for TICS installations using the legacy deployment architecture. - macOS runners (GitHub-hosted or self-hosted) are not yet supported. - The connected runner should have Git installed. +# Setup Add the `TICS GitHub Action` to your workflow to launch TICS code analysis and post the results of Quality Gating feature as part of your pull request. Below are some example of how to include the `TICS GitHub Action` step as part of your workflow. -### Client (default) - -The default mode to run is [TICS Client](https://ticsdocumentation.tiobe.com/latest/docs/#doc=user/enduser.html). In this mode, the commit or pull request will be evaluated. The quality gate determines wether the commit or pull request qualifies for delivery. +## Client (default) +The default mode to run is [TICS Client](https://ticsdocumentation.tiobe.com/latest/docs/#doc=user/enduser.html). In this mode, the commit or pull request will be evaluated. The `Quality Gate` determines wether the commit or pull request qualifies for delivery. The quality gate and measurement results are reported in your action summary and optionally the pull request can be decorated. +Below is an example of the minimum configuration that needs to be created in the workflow to enable TICS Client analysis: + ```yaml on: [pull_request] @@ -42,10 +44,35 @@ jobs: installTics: true ``` -### QServer +### Basic parameters +The following inputs are recommended or required for this action: + +| Input | Description | Required | +| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| `viewerUrl` | A URL pointing to the "cfg" API endpoint of the TICS Viewer. It contains the name of the TICS Analyzer Configuration or "-" in case of the default configuration. | true | +| `project` | Name of the TICS project present in the TICS Viewer. If not given it will use project `auto` when running Client. Is required for QServer. | false | +| `ticsAuthToken` | Authentication token to authorize the plugin when it connects to the TICS Viewer. (Only required if a token is needed to run TICS.) | false | +| `installTics` | Boolean parameter to install TICS command-line tools on a runner before executing the analysis. If not specified, TICS should be installed manually on the machine that runs this job, default value is `false`. | false | + +### Advanced parameters +The following options allow to instrument TICS Client more specifically: + +| Input | Description | Default | +| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | +| `filelist` | Path to a file containing the files (newline separated) to run TICS for. This can be an absolute or relative (to workspace) path, and can also be `.` to analyze the whole project. This has to be set when the action is run outside of a pull request. | - | +| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be used. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `GATE` | +| `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. The `GATE` GATE metric is supported for TICS Viewer versions higher than 2022.2.x. | - | +| `cdtoken` | A custom client-data token for the purpose of the Client Viewer functionality. This provides a static URL that is updated with every analysis. | - | +| `branchname` | Name of the branch in TICS. | - | +| `codetype` | Allows you to pick which specific types of code you want to analyze with the TICS client. Options are `PRODUCTION`, `TESTCODE` and `EXTERNAL`. | `PRODUCTION` | +| `excludeMovedFiles` | Exclude moved and renamed files from analysis completely. By default these are included if there are modifications in the file. | `false` | +| `showBlockingAfter` | Show the blocking after violations in the changed files window. Options are `true` or `false`. | `true` | +| `tmpdir` | Location to store debug information. | - | + +## QServer As of v3, the option to run [TICSQServer](https://ticsdocumentation.tiobe.com/latest/docs/#doc=admin/admin_A3_qserverref.html) analyses has been made available. -With TICSQServer, persistent measurement points are created which are stored in your Quality Database. These measurement points are used by the Client to determine how the code quality evolved from that point. +With TICSQServer, persistent measurement points are created which are stored in your Quality Database. These measurement points are used by the TICS Client to determine how the code quality evolved from that point. TICSQServer can also compare the last obtained results with the previous run and apply Quality Gating. ```yaml @@ -66,7 +93,52 @@ jobs: installTics: true ``` -### Diagnostic +### Basic parameters +The following inputs are recommended or required for this action: + +| Input | Description | Required | +| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | +| `viewerUrl` | A URL pointing to the "cfg" API endpoint of the TICS Viewer. It contains the name of the TICS Analyzer Configuration or "-" in case of the default configuration. | true | +| `mode` | Set the mode to run the action in. Options are `client` or `qserver` for an analysis run and `diagnostic` for a diagnostic run to test the setup. The default is `client`. | true | +| `project` | Name of the TICS project present in the TICS Viewer. | true | +| `ticsAuthToken` | Authentication token to authorize the plugin when it connects to the TICS Viewer. (Only required if a token is needed to run TICS.) | false | +| `installTics` | Boolean parameter to install TICS command-line tools on a runner before executing the analysis. If not specified, TICS should be installed manually on the machine that runs this job, default value is `false`. | false | + +### Advanced parameters +The following options allow to instrument TICSQServer more specifically: + +| Input | Description | Default | +| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | +| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be used. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `ALL` | +| `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. The `GATE` GATE metric is supported for TICS Viewer versions higher than 2022.2.x. | - | +| `branchdir` | Root directory of the source files for the branch. | - | +| `branchname` | Name of the branch in TICS. | - | +| `excludeMovedFiles` | Exclude moved and renamed files from analysis completely. By default these are included if there are modifications in the file. | `false` | +| `showBlockingAfter` | Show the blocking after violations in the changed files window. Options are `true` or `false`. | `true` | +| `tmpdir` | Location to store debug information. | - | + +## Other features +### Action parameters +Below are some special parameters that can be used to control how the Github Action posts its results: +| Input | Description | Default | Mode(s) | +| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | --------------- | +| `postAnnotations` | Show the TICS violations in the changed files window. Options are `true` or `false`. | `true` | all | +| `postToConversation` | Post the summary to the conversation page of the pull request. | `true` | all | +| `pullRequestApproval` | Set the plugin to approve or deny a pull request, by default this is false. Options are `true` or `false`. Note that once a run that added a reviewer has been completed, this reviewer cannot be deleted from that pull request. (Always the case on versions between 2.0.0 and 2.5.0). | `false` | all | + +### Infrastructural and Security related parameters +Below, parameters are described to control infra structure and security related aspects: +| Input | Description | Default | Mode(s) | +| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | --------------- | +| `githubToken` | Applied automatically in an action (see [Authenticating with the GITHUB_TOKEN](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)), can be overridden if needed. | `GITHUB_TOKEN` | all | +| `hostnameVerification` | Check whether the certificate matches the server. Options are `1`/`true` or `0`/`false`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `true` | all | +| `trustStrategy` | Check the validity of certificates. Options are `all`, `self-signed` or `strict`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `strict` | all | +| `retryCodes` | Status codes to retry api calls for. The default codes will be overwritten if this option is set. | `419`, `500`, `501`, `502`, `503`, `504` | all | +| `secretsFilter` | Comma-seperated list of extra secrets to mask in the console output. | - | all | +| `displayUrl` | The URL that end-users need to visit the TICS Viewer. This can differ from the viewerURL if TICS Client and TICSQServer communicate via a reverse proxy, but the end-users have direct access. (e.g. https://domain.com/tiobeweb/TICS) +| - | all | + +### Diagnostic Analysis mode There is also the possibility to do a so called "diagnostic" run. This mode can be anabled to test if TICS has been setup properly and can run on the machine the action is run on. @@ -86,43 +158,12 @@ jobs: ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }} installTics: true ``` - -### Supported Platforms - -Linux and Windows based runners, both Github-hosted and self-hosted, are supported. - -### Recommended parameters - +### Basic parameters The following inputs are recommended or required for this action: | Input | Description | Required | | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | | `viewerUrl` | A URL pointing to the "cfg" API endpoint of the TICS Viewer. It contains the name of the TICS Analyzer Configuration or "-" in case of the default configuration. | true | -| `mode` | Set the mode to run the action in. Options are `client` or `qserver` for an analysis run and `diagnostic` for a diagnostic run to test the setup. The default is `client`. | false | -| `project` | Name of the TICS project present in the TICS Viewer. If not given it will use project `auto` when running Client. Is required for QServer. | false | +| `mode` | Set the mode to run the action in. Options are `client` or `qserver` for an analysis run and `diagnostic` for a diagnostic run to test the setup. The default is `client`. | true | | `ticsAuthToken` | Authentication token to authorize the plugin when it connects to the TICS Viewer. (Only required if a token is needed to run TICS.) | false | | `installTics` | Boolean parameter to install TICS command-line tools on a runner before executing the analysis. If not specified, TICS should be installed manually on the machine that runs this job, default value is `false`. | false | - -### Optional parameters - -| Input | Description | Default | Mode(s) | -| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | --------------- | -| `githubToken` | The action by Github automatically in an action (see [Authenticating with the GITHUB_TOKEN](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)), can be overridden if needed. | `GITHUB_TOKEN` | all | -| `filelist` | Path to a file containing the files (newline separated) to run TICS for. This can be an absolute or relative (to workspace) path, and can also be `.` to analyze the whole project. This has to be set when the action is run outside of a pull request. | - | client | -| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be used. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `GATE` | client, qserver | -| `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. The `GATE` GATE metric is supported for TICS Viewer versions higher than 2022.2.x. | - | client, qserver | -| `cdtoken` | A custom client-data token for the purpose of the Client Viewer functionality. This provides a static URL that is updated with every analysis. | - | client | -| `branchdir` | Root directory of the source files for the branch. | - | qserver | -| `branchname` | Name of the branch in TICS. | - | client, qserver | -| `codetype` | Allows you to pick which specific types of code you want to analyze with the TICS client. Options are `PRODUCTION`, `TESTCODE` and `EXTERNAL`. | `PRODUCTION` | client | -| `excludeMovedFiles` | Exclude moved and renamed files from analysis completely. By default these are included if there are modifications in the file. | `false` | all | -| `hostnameVerification` | Check whether the certificate matches the server. Options are `1`/`true` or `0`/`false`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `true` | all | -| `trustStrategy` | Check the validity of certificates. Options are `all`, `self-signed` or `strict`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `strict` | all | -| `postAnnotations` | Show the TICS violations in the changed files window. Options are `true` or `false`. | `true` | all | -| `postToConversation` | Post the summary to the conversation page of the pull request. | `true` | all | -| `pullRequestApproval` | Set the plugin to approve or deny a pull request, by default this is false. Options are `true` or `false`. Note that once a run that added a reviewer has been completed, this reviewer cannot be deleted from that pull request. (Always the case on versions between 2.0.0 and 2.5.0). | `false` | all | -| `retryCodes` | Status codes to retry api calls for. The default codes will be overwritten if this option is set. | `419`, `500`, `501`, `502`, `503`, `504` | all | -| `secretsFilter` | Comma-seperated list of extra secrets to mask in the console output. | - | all | -| `showBlockingAfter` | Show the blocking after violations in the changed files window. Options are `true` or `false`. | `true` | all | -| `tmpdir` | Location to store debug information. | - | all | -| `displayUrl` | The publicly available Viewer URL of TICS viewer to link the links in the review to. (e.g. https://domain.com/tiobeweb/TICS) | - | all | From 87395f964abbc0e37db86cc6bb2a18269f03b0b9 Mon Sep 17 00:00:00 2001 From: Wener Date: Tue, 4 Jun 2024 17:40:00 +0200 Subject: [PATCH 04/18] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 38628060..bc2b99d5 100644 --- a/README.md +++ b/README.md @@ -135,8 +135,7 @@ Below, parameters are described to control infra structure and security related | `trustStrategy` | Check the validity of certificates. Options are `all`, `self-signed` or `strict`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `strict` | all | | `retryCodes` | Status codes to retry api calls for. The default codes will be overwritten if this option is set. | `419`, `500`, `501`, `502`, `503`, `504` | all | | `secretsFilter` | Comma-seperated list of extra secrets to mask in the console output. | - | all | -| `displayUrl` | The URL that end-users need to visit the TICS Viewer. This can differ from the viewerURL if TICS Client and TICSQServer communicate via a reverse proxy, but the end-users have direct access. (e.g. https://domain.com/tiobeweb/TICS) -| - | all | +| `displayUrl` | The URL that end-users need to visit the TICS Viewer. This can differ from the viewerURL if TICS Client and TICSQServer communicate via a reverse proxy, but the end-users have direct access. (e.g. https://domain.com/tiobeweb/TICS) | - | all | ### Diagnostic Analysis mode From d6c556dca5c90da6e284adcd455ba8732a323011 Mon Sep 17 00:00:00 2001 From: Wener Date: Tue, 4 Jun 2024 17:40:45 +0200 Subject: [PATCH 05/18] Update README.md Corrected typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bc2b99d5..4ff93f7e 100644 --- a/README.md +++ b/README.md @@ -139,7 +139,7 @@ Below, parameters are described to control infra structure and security related ### Diagnostic Analysis mode -There is also the possibility to do a so called "diagnostic" run. This mode can be anabled to test if TICS has been setup properly and can run on the machine the action is run on. +There is also the possibility to do a so called "diagnostic" run. This mode can be enabled to test if TICS has been setup properly and can run on the machine the action is run on. ```yaml on: [pull_request] From b36200c8be15559b71d5aef79a682b7fd4dae5fd Mon Sep 17 00:00:00 2001 From: Wener Date: Tue, 4 Jun 2024 17:50:53 +0200 Subject: [PATCH 06/18] Update README.md Updated QServer option table --- README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 4ff93f7e..77ccd992 100644 --- a/README.md +++ b/README.md @@ -107,15 +107,17 @@ The following inputs are recommended or required for this action: ### Advanced parameters The following options allow to instrument TICSQServer more specifically: -| Input | Description | Default | -| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be used. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `ALL` | -| `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. The `GATE` GATE metric is supported for TICS Viewer versions higher than 2022.2.x. | - | -| `branchdir` | Root directory of the source files for the branch. | - | -| `branchname` | Name of the branch in TICS. | - | -| `excludeMovedFiles` | Exclude moved and renamed files from analysis completely. By default these are included if there are modifications in the file. | `false` | -| `showBlockingAfter` | Show the blocking after violations in the changed files window. Options are `true` or `false`. | `true` | -| `tmpdir` | Location to store debug information. | - | +| Input | Description | Default | +| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------| ------- | +| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be used. | `ALL` | +| `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. | - | +| `nocalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be calculated. | - | +| `norecalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be recalculated. | - | +| `branchdir` | Root directory of the source files for the branch. | - | +| `branchname` | Name of the branch in TICS. | - | +| `excludeMovedFiles` | Exclude moved and renamed files from analysis completely. By default these are included if there are modifications in the file. | `false` | +| `showBlockingAfter` | Show the blocking after violations in the changed files window. Options are `true` or `false`. | `true` | +| `tmpdir` | Location to store debug information. | - | ## Other features ### Action parameters From e2e109e50cba1ff6ae90179bede51205930d526b Mon Sep 17 00:00:00 2001 From: Wener Date: Tue, 4 Jun 2024 19:41:47 +0200 Subject: [PATCH 07/18] Update README.md Resolved remarks from @lmtjanssen --- README.md | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 77ccd992..28f59f8d 100644 --- a/README.md +++ b/README.md @@ -57,17 +57,19 @@ The following inputs are recommended or required for this action: ### Advanced parameters The following options allow to instrument TICS Client more specifically: -| Input | Description | Default | -| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | -| `filelist` | Path to a file containing the files (newline separated) to run TICS for. This can be an absolute or relative (to workspace) path, and can also be `.` to analyze the whole project. This has to be set when the action is run outside of a pull request. | - | -| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be used. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `GATE` | -| `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. The `GATE` GATE metric is supported for TICS Viewer versions higher than 2022.2.x. | - | -| `cdtoken` | A custom client-data token for the purpose of the Client Viewer functionality. This provides a static URL that is updated with every analysis. | - | -| `branchname` | Name of the branch in TICS. | - | -| `codetype` | Allows you to pick which specific types of code you want to analyze with the TICS client. Options are `PRODUCTION`, `TESTCODE` and `EXTERNAL`. | `PRODUCTION` | -| `excludeMovedFiles` | Exclude moved and renamed files from analysis completely. By default these are included if there are modifications in the file. | `false` | -| `showBlockingAfter` | Show the blocking after violations in the changed files window. Options are `true` or `false`. | `true` | -| `tmpdir` | Location to store debug information. | - | +| Input | Description | Default | +|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | +| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be used. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `GATE` | +| `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. The `GATE` GATE metric is supported for TICS Viewer versions higher than 2022.2.x. | - | +| `nocalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be calculated. | - | +| `norecalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be recalculated. | - | +| `filelist` | Path to a file containing the files (newline separated) to run TICS for. This can be an absolute or relative (to workspace) path, and can also be `.` to analyze the whole project. This has to be set when the action is run outside of a pull request. | - | +| `cdtoken` | A custom client-data token for the purpose of the Client Viewer functionality. This provides a static URL that is updated with every analysis. | - | +| `branchname` | Name of the branch in TICS. | - | +| `codetype` | Allows you to pick which specific types of code you want to analyze with the TICS client. Options are `PRODUCTION`, `TESTCODE` and `EXTERNAL`. | `PRODUCTION`| +| `excludeMovedFiles` | Exclude moved and renamed files from analysis completely. By default these are included if there are modifications in the file. | `false` | +| `showBlockingAfter` | Show the blocking after violations in the changed files window. Options are `true` or `false`. | `true` | +| `tmpdir` | Location to store debug information. | - | ## QServer @@ -122,22 +124,22 @@ The following options allow to instrument TICSQServer more specifically: ## Other features ### Action parameters Below are some special parameters that can be used to control how the Github Action posts its results: -| Input | Description | Default | Mode(s) | -| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | --------------- | -| `postAnnotations` | Show the TICS violations in the changed files window. Options are `true` or `false`. | `true` | all | -| `postToConversation` | Post the summary to the conversation page of the pull request. | `true` | all | -| `pullRequestApproval` | Set the plugin to approve or deny a pull request, by default this is false. Options are `true` or `false`. Note that once a run that added a reviewer has been completed, this reviewer cannot be deleted from that pull request. (Always the case on versions between 2.0.0 and 2.5.0). | `false` | all | +| Input | Description | Default | +| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | +| `postAnnotations` | Show the TICS violations in the changed files window. Options are `true` or `false`. | `true` | +| `postToConversation` | Post the summary to the conversation page of the pull request. | `true` | +| `pullRequestApproval` | Set the plugin to approve or deny a pull request, by default this is false. Options are `true` or `false`. Note that once a run that added a reviewer has been completed, this reviewer cannot be deleted from that pull request. (Always the case on versions between 2.0.0 and 2.5.0). | `false` | ### Infrastructural and Security related parameters Below, parameters are described to control infra structure and security related aspects: -| Input | Description | Default | Mode(s) | -| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | --------------- | -| `githubToken` | Applied automatically in an action (see [Authenticating with the GITHUB_TOKEN](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)), can be overridden if needed. | `GITHUB_TOKEN` | all | -| `hostnameVerification` | Check whether the certificate matches the server. Options are `1`/`true` or `0`/`false`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `true` | all | -| `trustStrategy` | Check the validity of certificates. Options are `all`, `self-signed` or `strict`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `strict` | all | -| `retryCodes` | Status codes to retry api calls for. The default codes will be overwritten if this option is set. | `419`, `500`, `501`, `502`, `503`, `504` | all | -| `secretsFilter` | Comma-seperated list of extra secrets to mask in the console output. | - | all | -| `displayUrl` | The URL that end-users need to visit the TICS Viewer. This can differ from the viewerURL if TICS Client and TICSQServer communicate via a reverse proxy, but the end-users have direct access. (e.g. https://domain.com/tiobeweb/TICS) | - | all | +| Input | Description | Default | +| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | +| `githubToken` | Applied automatically in an action (see [Authenticating with the GITHUB_TOKEN](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)), can be overridden if needed. | `GITHUB_TOKEN` | +| `hostnameVerification` | Check whether the certificate matches the server. Options are `1`/`true` or `0`/`false`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `true` | +| `trustStrategy` | Check the validity of certificates. Options are `all`, `self-signed` or `strict`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `strict` | +| `retryCodes` | Status codes to retry api calls for. The default codes will be overwritten if this option is set. | `419`, `500`, `501`, `502`, `503`, `504` | +| `secretsFilter` | Comma-seperated list of extra secrets to mask in the console output. | - | +| `displayUrl` | The URL that end-users need to visit the TICS Viewer. This can differ from the viewerURL if TICS Client and TICSQServer communicate via a reverse proxy, but the end-users have direct access. (e.g. https://domain.com/tiobeweb/TICS) | - | ### Diagnostic Analysis mode @@ -159,7 +161,7 @@ jobs: ticsAuthToken: ${{ secrets.TICSAUTHTOKEN }} installTics: true ``` -### Basic parameters +#### Basic parameters The following inputs are recommended or required for this action: | Input | Description | Required | From 7771da95fc90de6ae7c457c409e58ddafdcf85a7 Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 09:29:52 +0200 Subject: [PATCH 08/18] Update README.md Give more body to introduction story --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 28f59f8d..01baa3fd 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,13 @@ [![Tests](https://github.com/tiobe/tics-github-action/actions/workflows/test.yml/badge.svg)](https://github.com/tiobe/tics-github-action/actions/workflows/test.yml) [![CodeQL](https://github.com/tiobe/tics-github-action/actions/workflows/codeql.yml/badge.svg)](https://github.com/tiobe/tics-github-action/actions/workflows/codeql.yml) -The TICS Github action integrates TICS analysis to measure your code quality. The incorporated Quality gating feature enables you to analyze and decorate pull requests. +The TICS Github action integrates the [TICS code quality framework](https://www.tiobe.com/products/tics/) into your workflows. This allows you to effectively measure and monitor the software code quality of all your projects and its branches. +The incorporated `Quality Gating` feature can be used for `Pull Request` and `Commit` approvals. It can also decorate your pull request so the quality data is easily available. +Furthermore, the changed files are annotated with findings from the TICS analysis, so it is clear where the issues are and thus where they need to be addressed. + +There are two types of analysis modes available: +- Reference runs using TICS QServer (See section QServer). Reference points with code quality metric data are created that are used for the qualification runs. Intended for branches where other branches are derived from and will be merged back to (Like main). +- Qualification runs using TICS Client (See section Client). Compares a set of changed files from a commit or pull request to the reference point for qualification, using a Quality Gate. Intended for any branch that needs to be merged back. ## Before you start ### Prerequisites From 9bcff40e458e24d8479f1ba98e8f573357d087c7 Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 09:52:29 +0200 Subject: [PATCH 09/18] Update README.md Added migration guide --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 01baa3fd..7cce8500 100644 --- a/README.md +++ b/README.md @@ -176,3 +176,14 @@ The following inputs are recommended or required for this action: | `mode` | Set the mode to run the action in. Options are `client` or `qserver` for an analysis run and `diagnostic` for a diagnostic run to test the setup. The default is `client`. | true | | `ticsAuthToken` | Authentication token to authorize the plugin when it connects to the TICS Viewer. (Only required if a token is needed to run TICS.) | false | | `installTics` | Boolean parameter to install TICS command-line tools on a runner before executing the analysis. If not specified, TICS should be installed manually on the machine that runs this job, default value is `false`. | false | + +## Migration from v2 to v3 +The interface (running with params) have been changed to depict their usage better or to synchronise with the TICS command line usage and by synchronous with other plugins we provide. +Parameter Changes (v2/old -> v3/new): +- ticsConfiguration -> viewerUrl +- viewerUrl -> displayUrl +- projectName -> project +- branchName -> branchname +- branchDir -> branchdir +- clientData -> cdtoken +- tmpDir -> tmpdir From f8b08da31277dd4669ea6ec7194819b078b04850 Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 10:12:37 +0200 Subject: [PATCH 10/18] Update README.md Resolved comments from @zon-tiobe --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7cce8500..b301b026 100644 --- a/README.md +++ b/README.md @@ -70,12 +70,12 @@ The following options allow to instrument TICS Client more specifically: | `nocalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be calculated. | - | | `norecalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be recalculated. | - | | `filelist` | Path to a file containing the files (newline separated) to run TICS for. This can be an absolute or relative (to workspace) path, and can also be `.` to analyze the whole project. This has to be set when the action is run outside of a pull request. | - | -| `cdtoken` | A custom client-data token for the purpose of the Client Viewer functionality. This provides a static URL that is updated with every analysis. | - | -| `branchname` | Name of the branch in TICS. | - | -| `codetype` | Allows you to pick which specific types of code you want to analyze with the TICS client. Options are `PRODUCTION`, `TESTCODE` and `EXTERNAL`. | `PRODUCTION`| -| `excludeMovedFiles` | Exclude moved and renamed files from analysis completely. By default these are included if there are modifications in the file. | `false` | -| `showBlockingAfter` | Show the blocking after violations in the changed files window. Options are `true` or `false`. | `true` | -| `tmpdir` | Location to store debug information. | - | +| `cdtoken` | A custom client-data token for the purpose of the Client Viewer functionality. This provides a static URL that is updated with every analysis. | - | +| `branchname` | Name of the branch in TICS. | - | +| `codetype` | Allows you to pick which specific types of code you want to analyze with the TICS client. Options are `PRODUCTION`, `TESTCODE`, `EXTERNAL` and `GENERATED`. | `PRODUCTION`| +| `excludeMovedFiles` | Exclude moved and renamed files from analysis completely. By default these are included if there are modifications in the file. | `false` | +| `showBlockingAfter` | Show the blocking after violations in the changed files window. Options are `true` or `false`. | `true` | +| `tmpdir` | Location to store debug information. | - | ## QServer @@ -134,7 +134,7 @@ Below are some special parameters that can be used to control how the Github Act | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | | `postAnnotations` | Show the TICS violations in the changed files window. Options are `true` or `false`. | `true` | | `postToConversation` | Post the summary to the conversation page of the pull request. | `true` | -| `pullRequestApproval` | Set the plugin to approve or deny a pull request, by default this is false. Options are `true` or `false`. Note that once a run that added a reviewer has been completed, this reviewer cannot be deleted from that pull request. (Always the case on versions between 2.0.0 and 2.5.0). | `false` | +| `pullRequestApproval` | Set the plugin to approve or deny a pull request, by default this is false. Options are `true` or `false`. Note that once a run that added a reviewer has been completed, this reviewer cannot be deleted from that pull request. (Always the case on versions between TICS Github Action 2.0.0 and 2.5.0). | `false` | ### Infrastructural and Security related parameters Below, parameters are described to control infra structure and security related aspects: @@ -144,12 +144,12 @@ Below, parameters are described to control infra structure and security related | `hostnameVerification` | Check whether the certificate matches the server. Options are `1`/`true` or `0`/`false`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `true` | | `trustStrategy` | Check the validity of certificates. Options are `all`, `self-signed` or `strict`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `strict` | | `retryCodes` | Status codes to retry api calls for. The default codes will be overwritten if this option is set. | `419`, `500`, `501`, `502`, `503`, `504` | -| `secretsFilter` | Comma-seperated list of extra secrets to mask in the console output. | - | +| `secretsFilter` | Comma-separated list of extra secrets to mask in the console output. | - | | `displayUrl` | The URL that end-users need to visit the TICS Viewer. This can differ from the viewerURL if TICS Client and TICSQServer communicate via a reverse proxy, but the end-users have direct access. (e.g. https://domain.com/tiobeweb/TICS) | - | ### Diagnostic Analysis mode -There is also the possibility to do a so called "diagnostic" run. This mode can be enabled to test if TICS has been setup properly and can run on the machine the action is run on. +There is also the possibility to do a so called "diagnostic" run. This mode can be enabled to test if TICS has been set up properly and can run on the machine the action is run on. ```yaml on: [pull_request] @@ -178,7 +178,7 @@ The following inputs are recommended or required for this action: | `installTics` | Boolean parameter to install TICS command-line tools on a runner before executing the analysis. If not specified, TICS should be installed manually on the machine that runs this job, default value is `false`. | false | ## Migration from v2 to v3 -The interface (running with params) have been changed to depict their usage better or to synchronise with the TICS command line usage and by synchronous with other plugins we provide. +The interface (running with parameters) has been changed to better reflect its usage. This interface is now more synchronized with TICS command line usage, and have been changed to be closer to other plugins that TIOBE provides. Parameter Changes (v2/old -> v3/new): - ticsConfiguration -> viewerUrl - viewerUrl -> displayUrl From fb20e873effeed3916ed2d3cfff2f1dc7808adbb Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 10:34:15 +0200 Subject: [PATCH 11/18] Update README.md Co-authored-by: brouwers <122355335+brouwers-tiobe@users.noreply.github.com> --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b301b026..63d44610 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,8 @@ [![Tests](https://github.com/tiobe/tics-github-action/actions/workflows/test.yml/badge.svg)](https://github.com/tiobe/tics-github-action/actions/workflows/test.yml) [![CodeQL](https://github.com/tiobe/tics-github-action/actions/workflows/codeql.yml/badge.svg)](https://github.com/tiobe/tics-github-action/actions/workflows/codeql.yml) -The TICS Github action integrates the [TICS code quality framework](https://www.tiobe.com/products/tics/) into your workflows. This allows you to effectively measure and monitor the software code quality of all your projects and its branches. +The TICS GitHub action integrates the [TICS code quality framework](https://www.tiobe.com/products/tics/) into your workflows. This allows you to effectively measure and monitor the software code quality of all your projects and their branches. + The incorporated `Quality Gating` feature can be used for `Pull Request` and `Commit` approvals. It can also decorate your pull request so the quality data is easily available. Furthermore, the changed files are annotated with findings from the TICS analysis, so it is clear where the issues are and thus where they need to be addressed. From 68d6cc63ce5108ed7590323d547e9e7e31cd0cdd Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 10:44:56 +0200 Subject: [PATCH 12/18] Update README.md Co-authored-by: brouwers <122355335+brouwers-tiobe@users.noreply.github.com> --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 63d44610..bfa7043e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,8 @@ There are two types of analysis modes available: A TICS Viewer (version 2022.4 or higher) running somewhere on the network that is HTTP(S) accessible by the runner on which you want to execute the action. ### Supported Platforms -Linux and Windows based runners, both Github-hosted and self-hosted, are supported. +Linux and Windows based runners, both GitHub-hosted and self-hosted, are supported. + ### Action Restrictions - It is not working for forked repositories. From 0d3c662f09c118d4a8d6aae994acf500f46e1caa Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 10:45:02 +0200 Subject: [PATCH 13/18] Update README.md Co-authored-by: brouwers <122355335+brouwers-tiobe@users.noreply.github.com> --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bfa7043e..f1b3e186 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,8 @@ The following options allow to instrument TICSQServer more specifically: ## Other features ### Action parameters -Below are some special parameters that can be used to control how the Github Action posts its results: +Below are some special parameters that can be used to control how the GitHub Action posts its results: + | Input | Description | Default | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | | `postAnnotations` | Show the TICS violations in the changed files window. Options are `true` or `false`. | `true` | From 6e0d00c0d3545dd21d21750ef4b0dcbfa3a2177a Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 10:45:09 +0200 Subject: [PATCH 14/18] Update README.md Co-authored-by: brouwers <122355335+brouwers-tiobe@users.noreply.github.com> --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f1b3e186..89feb490 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,8 @@ The following options allow to instrument TICS Client more specifically: | Input | Description | Default | |------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | -| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be used. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `GATE` | +| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be calculated. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `GATE` | + | `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. The `GATE` GATE metric is supported for TICS Viewer versions higher than 2022.2.x. | - | | `nocalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be calculated. | - | | `norecalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be recalculated. | - | From 8d0973cbbba6e5dcccec28ade666bd4d26de5cdc Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 10:51:03 +0200 Subject: [PATCH 15/18] Update README.md Fixed remaining comments from @brouwers-tiobe --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 89feb490..5d22d115 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ The incorporated `Quality Gating` feature can be used for `Pull Request` and `Co Furthermore, the changed files are annotated with findings from the TICS analysis, so it is clear where the issues are and thus where they need to be addressed. There are two types of analysis modes available: -- Reference runs using TICS QServer (See section QServer). Reference points with code quality metric data are created that are used for the qualification runs. Intended for branches where other branches are derived from and will be merged back to (Like main). -- Qualification runs using TICS Client (See section Client). Compares a set of changed files from a commit or pull request to the reference point for qualification, using a Quality Gate. Intended for any branch that needs to be merged back. +- Reference runs using TICS QServer (See section QServer). Reference points with code quality metric data are created that are used for the qualification runs. Intended for base branches of pull requests, e.g. `main`. +- Qualification runs using TICS Client (See section Client). Compares a set of changed files from a commit or pull request to the reference point for qualification, using a Quality Gate. Intended for pull requests and branches like feature or bug-fix branches. ## Before you start ### Prerequisites @@ -120,7 +120,7 @@ The following options allow to instrument TICSQServer more specifically: | Input | Description | Default | | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------| ------- | -| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be used. | `ALL` | +| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be calculated. | `ALL` | | `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. | - | | `nocalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be calculated. | - | | `norecalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be recalculated. | - | @@ -138,7 +138,7 @@ Below are some special parameters that can be used to control how the GitHub Act | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | | `postAnnotations` | Show the TICS violations in the changed files window. Options are `true` or `false`. | `true` | | `postToConversation` | Post the summary to the conversation page of the pull request. | `true` | -| `pullRequestApproval` | Set the plugin to approve or deny a pull request, by default this is false. Options are `true` or `false`. Note that once a run that added a reviewer has been completed, this reviewer cannot be deleted from that pull request. (Always the case on versions between TICS Github Action 2.0.0 and 2.5.0). | `false` | +| `pullRequestApproval` | Set the plugin to approve or deny a pull request, by default this is false. Options are `true` or `false`. Note that once a run that added a reviewer has been completed, this reviewer cannot be deleted from that pull request. (Always the case on versions between TICS GitHub Action 2.0.0 and 2.5.0). | `false` | ### Infrastructural and Security related parameters Below, parameters are described to control infra structure and security related aspects: From ae1eb3e7ef294fab824fe6024553fc7c95b6969a Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 10:54:36 +0200 Subject: [PATCH 16/18] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5d22d115..3004bb37 100644 --- a/README.md +++ b/README.md @@ -10,8 +10,8 @@ The incorporated `Quality Gating` feature can be used for `Pull Request` and `Co Furthermore, the changed files are annotated with findings from the TICS analysis, so it is clear where the issues are and thus where they need to be addressed. There are two types of analysis modes available: -- Reference runs using TICS QServer (See section QServer). Reference points with code quality metric data are created that are used for the qualification runs. Intended for base branches of pull requests, e.g. `main`. -- Qualification runs using TICS Client (See section Client). Compares a set of changed files from a commit or pull request to the reference point for qualification, using a Quality Gate. Intended for pull requests and branches like feature or bug-fix branches. +- `Reference runs` using TICS QServer (See section QServer). Reference points with code quality metric data are created that are used for the qualification runs. Intended for base branches of pull requests, e.g. `main`. +- `Qualification runs` using TICS Client (See section Client). Compares a set of changed files from a commit or pull request to the reference point for qualification, using a Quality Gate. Intended for pull requests and branches like feature or bug-fix branches. ## Before you start ### Prerequisites From 925a2f03513e861fca5a2436cc6daf181aa5973c Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 10:56:06 +0200 Subject: [PATCH 17/18] Update README.md Fixed broken table --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 3004bb37..09c5921a 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,6 @@ The following options allow to instrument TICS Client more specifically: | Input | Description | Default | |------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | | `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be calculated. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `GATE` | - | `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. The `GATE` GATE metric is supported for TICS Viewer versions higher than 2022.2.x. | - | | `nocalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be calculated. | - | | `norecalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be recalculated. | - | From 36741189540f20f29b5c48c4bf05a1a0303a22f9 Mon Sep 17 00:00:00 2001 From: Wener Date: Wed, 5 Jun 2024 12:12:04 +0200 Subject: [PATCH 18/18] Update README.md Processed remarks from @zon-tiobe --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 09c5921a..1eebc20a 100644 --- a/README.md +++ b/README.md @@ -67,10 +67,10 @@ The following options allow to instrument TICS Client more specifically: | Input | Description | Default | |------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | -| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be calculated. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `GATE` | -| `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. The `GATE` GATE metric is supported for TICS Viewer versions higher than 2022.2.x. | - | -| `nocalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be calculated. | - | -| `norecalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be recalculated. | - | +| `calc` | Comma-separated list of [metrics](https://ticsdocumentation.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be calculated. The `GATE` metric is supported for TICS Viewer versions higher than 2022.2.x. | `GATE` | +| `recalc` | Comma-separated list of [metrics](https://ticsdocumentation.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. The `GATE` GATE metric is supported for TICS Viewer versions higher than 2022.2.x. | - | +| `nocalc` | Comma-separated list of [metrics](https://ticsdocumentation.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be calculated. | - | +| `norecalc` | Comma-separated list of [metrics](https://ticsdocumentation.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be recalculated. | - | | `filelist` | Path to a file containing the files (newline separated) to run TICS for. This can be an absolute or relative (to workspace) path, and can also be `.` to analyze the whole project. This has to be set when the action is run outside of a pull request. | - | | `cdtoken` | A custom client-data token for the purpose of the Client Viewer functionality. This provides a static URL that is updated with every analysis. | - | | `branchname` | Name of the branch in TICS. | - | @@ -119,10 +119,10 @@ The following options allow to instrument TICSQServer more specifically: | Input | Description | Default | | ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------| ------- | -| `calc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be calculated. | `ALL` | -| `recalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. | - | -| `nocalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be calculated. | - | -| `norecalc` | Comma-separated list of [metrics](https://portal.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be recalculated. | - | +| `calc` | Comma-separated list of [metrics](https://ticsdocumentation.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be calculated. | `ALL` | +| `recalc` | Comma-separated list of [metrics](https://ticsdocumentation.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to be recalculated. | - | +| `nocalc` | Comma-separated list of [metrics](https://ticsdocumentation.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be calculated. | - | +| `norecalc` | Comma-separated list of [metrics](https://ticsdocumentation.tiobe.com/latest/docs/index.html#doc=user/clientoptions.html%23MetricAliases) to not be recalculated. | - | | `branchdir` | Root directory of the source files for the branch. | - | | `branchname` | Name of the branch in TICS. | - | | `excludeMovedFiles` | Exclude moved and renamed files from analysis completely. By default these are included if there are modifications in the file. | `false` | @@ -144,8 +144,8 @@ Below, parameters are described to control infra structure and security related | Input | Description | Default | | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | | `githubToken` | Applied automatically in an action (see [Authenticating with the GITHUB_TOKEN](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/authenticating-with-the-github_token)), can be overridden if needed. | `GITHUB_TOKEN` | -| `hostnameVerification` | Check whether the certificate matches the server. Options are `1`/`true` or `0`/`false`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `true` | -| `trustStrategy` | Check the validity of certificates. Options are `all`, `self-signed` or `strict`. [Documentation on Client-side SSL/TLS](https://portal.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `strict` | +| `hostnameVerification` | Check whether the certificate matches the server. Options are `1`/`true` or `0`/`false`. [Documentation on Client-side SSL/TLS](https://ticsdocumentation.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `true` | +| `trustStrategy` | Check the validity of certificates. Options are `all`, `self-signed` or `strict`. [Documentation on Client-side SSL/TLS](https://ticsdocumentation.tiobe.com/latest/docs/#doc=admin/admin_11_viewer.html%23ssl-wrapper). | `strict` | | `retryCodes` | Status codes to retry api calls for. The default codes will be overwritten if this option is set. | `419`, `500`, `501`, `502`, `503`, `504` | | `secretsFilter` | Comma-separated list of extra secrets to mask in the console output. | - | | `displayUrl` | The URL that end-users need to visit the TICS Viewer. This can differ from the viewerURL if TICS Client and TICSQServer communicate via a reverse proxy, but the end-users have direct access. (e.g. https://domain.com/tiobeweb/TICS) | - | @@ -181,7 +181,7 @@ The following inputs are recommended or required for this action: | `installTics` | Boolean parameter to install TICS command-line tools on a runner before executing the analysis. If not specified, TICS should be installed manually on the machine that runs this job, default value is `false`. | false | ## Migration from v2 to v3 -The interface (running with parameters) has been changed to better reflect its usage. This interface is now more synchronized with TICS command line usage, and have been changed to be closer to other plugins that TIOBE provides. +The interface (running with parameters) has been changed to better reflect its usage. This interface is now more synchronized with TICS command line usage, and has been changed to be closer to other plugins that TIOBE provides. Parameter Changes (v2/old -> v3/new): - ticsConfiguration -> viewerUrl - viewerUrl -> displayUrl