You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This action enables you to run code analysis with Parasoft C/C++test Standard an
8
8
9
9
Parasoft C/C++test uses a comprehensive set of analysis techniques, including pattern-based static analysis, dataflow analysis, metrics, code coverage, unit testing, and more, to help you verify code quality and ensure compliance with industry standards, such as MISRA, AUTOSAR, and CERT.
10
10
- Request [a free trial](https://www.parasoft.com/products/parasoft-c-ctest/try/) to receive access to Parasoft C/C++test's features and capabilities.
11
-
- See the [user guide](https://docs.parasoft.com/display/CPPTEST20231) for information about Parasoft C/C++test's capabilities and usage.
11
+
- See the [user guide](https://docs.parasoft.com/display/CPPTEST20241) for information about Parasoft C/C++test's capabilities and usage.
12
12
13
13
Please visit the [official Parasoft website](http://www.parasoft.com) for more information about Parasoft C/C++test and other Parasoft products.
14
14
@@ -35,12 +35,12 @@ We recommend that you run Parasoft C/C++test on a self-hosted rather than GitHub
35
35
### Adding the Run C/C++test Action to a GitHub Workflow
36
36
Add the `Run C/C++test` action to your workflow to launch code analysis with Parasoft C/C++test.
37
37
38
-
Depending on the project type and the build system you are using (Make, CMake, etc.), you may need to adjust the workflow to collect the required input data for C/C++test. See the [C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20231/Running+Static+Analysis+1) for details.
38
+
Depending on the project type and the build system you are using (Make, CMake, etc.), you may need to adjust the workflow to collect the required input data for C/C++test. See the [C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20241/Running+Static+Analysis+1) for details.
39
39
40
40
```yaml
41
41
# Runs code analysis with C/C++test.
42
42
- name: Run C/C++test
43
-
uses: parasoft/run-cpptest-action@2.0.1
43
+
uses: parasoft/run-cpptest-action@2.0.2
44
44
with:
45
45
input: build/compile_commands.json
46
46
testConfig: 'builtin://MISRA C 2012'
@@ -57,7 +57,7 @@ To upload the SARIF report to GitHub, modify your workflow by adding the `upload
57
57
# Uploads analysis results in the SARIF format, so that they are displayed as GitHub code scanning alerts.
58
58
- name: Upload results (SARIF)
59
59
if: always()
60
-
uses: github/codeql-action/upload-sarif@v2
60
+
uses: github/codeql-action/upload-sarif@v3
61
61
with:
62
62
sarif_file: reports/report.sarif
63
63
```
@@ -68,7 +68,7 @@ To upload reports in other formats, modify your workflow by adding the `upload-
68
68
# Uploads an archive that includes all report files (.xml, .html, .sarif).
69
69
- name: Archive reports
70
70
if: always()
71
-
uses: actions/upload-artifact@v3
71
+
uses: actions/upload-artifact@v4
72
72
with:
73
73
name: CpptestReports
74
74
path: reports/*.*
@@ -115,7 +115,7 @@ jobs:
115
115
116
116
# Checks out your repository under $GITHUB_WORKSPACE, so that your job can access it.
117
117
- name: Checkout code
118
-
uses: actions/checkout@v3
118
+
uses: actions/checkout@v4
119
119
120
120
# Configures your CMake project. Be sure the compile_commands.json file is created.
121
121
- name: Configure project
@@ -128,7 +128,7 @@ jobs:
128
128
# Runs code analysis with C/C++test.
129
129
- name: Run C/C++test
130
130
# Use the 'run-cpptest-action' GitHub action.
131
-
uses: parasoft/run-cpptest-action@2.0.1
131
+
uses: parasoft/run-cpptest-action@2.0.2
132
132
# Optional parameters for 'run-cpptest-action'.
133
133
with:
134
134
# For CMake-based projects, use a compile_commands.json file as the input for analysis.
@@ -140,14 +140,14 @@ jobs:
140
140
# Uploads analysis results in the SARIF format, so that they are displayed as GitHub code scanning alerts.
141
141
- name: Upload results (SARIF)
142
142
if: always()
143
-
uses: github/codeql-action/upload-sarif@v2
143
+
uses: github/codeql-action/upload-sarif@v3
144
144
with:
145
145
sarif_file: reports/report.sarif
146
146
147
147
# Uploads an archive that includes all report files (.xml, .html, .sarif).
148
148
- name: Archive reports
149
149
if: always()
150
-
uses: actions/upload-artifact@v3
150
+
uses: actions/upload-artifact@v4
151
151
with:
152
152
name: CpptestReports
153
153
path: reports/*.*
@@ -192,7 +192,7 @@ jobs:
192
192
193
193
# Checks out your repository under $GITHUB_WORKSPACE, so that your job can access it.
194
194
- name: Checkout code
195
-
uses: actions/checkout@v3
195
+
uses: actions/checkout@v4
196
196
197
197
# Builds your Make project using 'cpptesttrace' to collect input data for code analysis.
198
198
# Be sure 'cpptesttrace' is available on $PATH.
@@ -202,7 +202,7 @@ jobs:
202
202
# Runs code analysis with C/C++test.
203
203
- name: Run C/C++test
204
204
# Use the 'run-cpptest-action' GitHub action.
205
-
uses: parasoft/run-cpptest-action@2.0.1
205
+
uses: parasoft/run-cpptest-action@2.0.2
206
206
# Uncomment if you are using C/C++test 2020.2 to generate a SARIF report:
207
207
# with:
208
208
# reportFormat: xml,html,custom
@@ -211,14 +211,14 @@ jobs:
211
211
# Uploads analysis results in the SARIF format, so that they are displayed as GitHub code scanning alerts.
212
212
- name: Upload results (SARIF)
213
213
if: always()
214
-
uses: github/codeql-action/upload-sarif@v2
214
+
uses: github/codeql-action/upload-sarif@v3
215
215
with:
216
216
sarif_file: reports/report.sarif
217
217
218
218
# Uploads an archive that includes all report files (.xml, .html, .sarif).
219
219
- name: Archive reports
220
220
if: always()
221
-
uses: actions/upload-artifact@v3
221
+
uses: actions/upload-artifact@v4
222
222
with:
223
223
name: CpptestReports
224
224
path: reports/*.*
@@ -227,7 +227,7 @@ jobs:
227
227
## Configuring Analysis with C/C++test
228
228
You can configure analysis with Parasoft C/C++test in the following ways:
229
229
- By customizing the `Run C/C++test` action directly in your GitHub workflow. See [Action Parameters](#action-parameters) for a complete list of available parameters.
230
-
- By configuring options in Parasoft C/C++test tool. We recommend creating a `cpptestcli.properties` file that includes all the configuration options and adding the file to C/C++test's working directory - typically, the root directory of your repository. This allows C/C++test to automatically read all the configuration options from that file. See [Parasoft C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20231/Configuration+1) for details.
230
+
- By configuring options in Parasoft C/C++test tool. We recommend creating a `cpptestcli.properties` file that includes all the configuration options and adding the file to C/C++test's working directory - typically, the root directory of your repository. This allows C/C++test to automatically read all the configuration options from that file. See [Parasoft C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20241/Configuration+1) for details.
231
231
232
232
### Examples
233
233
This section includes practical examples of how the `Run C/C++test` action can be customized directly in the YAML file of your workflow.
@@ -237,35 +237,35 @@ If `cpptestcli` executable is not on `$PATH`, you can configure the path to the
237
237
238
238
```yaml
239
239
- name: Run C/C++test
240
-
uses: parasoft/run-cpptest-action@2.0.1
240
+
uses: parasoft/run-cpptest-action@2.0.2
241
241
with:
242
242
installDir: '/opt/parasoft/cpptest'
243
243
```
244
244
245
245
#### Defining the Scope of Analysis
246
-
You can configure the `input` parameter to provide the path to a file that defines the scope of analysis (includes a list of source files and compile commands). This parameter depends on the project type and the build system you are using. See the [C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20231/Running+Static+Analysis+1) for details.
246
+
You can configure the `input` parameter to provide the path to a file that defines the scope of analysis (includes a list of source files and compile commands). This parameter depends on the project type and the build system you are using. See the [C/C++test User Guide](https://docs.parasoft.com/display/CPPTEST20241/Running+Static+Analysis+1) for details.
247
247
```yaml
248
248
- name: Run C/C++test
249
-
uses: parasoft/run-cpptest-action@2.0.1
249
+
uses: parasoft/run-cpptest-action@2.0.2
250
250
with:
251
251
input: 'build/compile_commands.json'
252
252
```
253
253
254
254
#### Configuring a C/C++test Test Configuration
255
-
Code analysis with C/C++test is performed by using a test configuration - a set of static analysis rules that enforce best coding practices or compliance guidelines. Parasoft C/C++test ships with a wide range of [built-in test configurations](https://docs.parasoft.com/display/CPPTEST20231/Built-in+Test+Configurations).
255
+
Code analysis with C/C++test is performed by using a test configuration - a set of static analysis rules that enforce best coding practices or compliance guidelines. Parasoft C/C++test ships with a wide range of [built-in test configurations](https://docs.parasoft.com/display/CPPTEST20241/Built-in+Test+Configurations).
256
256
To specify a test configuration directly in your workflow, add the `testConfig` parameter to the `Run C/C++test` action and specify the URL of the test configuration you want to use:
257
257
```yaml
258
258
- name: Run C/C++test
259
-
uses: parasoft/run-cpptest-action@2.0.1
259
+
uses: parasoft/run-cpptest-action@2.0.2
260
260
with:
261
261
testConfig: 'builtin://MISRA C 2012'
262
262
```
263
263
264
264
#### Configuring a C/C++test Compiler Configuration
265
-
In order to run analysis, C/C++test needs to be configured for a specific compiler. You need to specify the configuration that matches your compiler with the `compilerConfig` parameter. See [Supported Compilers](https://docs.parasoft.com/display/CPPTEST20231/Supported+Compilers) for information about supported compilers.
265
+
In order to run analysis, C/C++test needs to be configured for a specific compiler. You need to specify the configuration that matches your compiler with the `compilerConfig` parameter. See [Supported Compilers](https://docs.parasoft.com/display/CPPTEST20241/Supported+Compilers) for information about supported compilers.
266
266
```yaml
267
267
- name: Run C/C++test
268
-
uses: parasoft/run-cpptest-action@2.0.1
268
+
uses: parasoft/run-cpptest-action@2.0.2
269
269
with:
270
270
compilerConfig: 'clang_10_0'
271
271
```
@@ -274,7 +274,7 @@ In order to run analysis, C/C++test needs to be configured for a specific compil
274
274
Generating reports in the SARIF format is available in C/C++test since version 2021.1. If you are using an earlier C/C++test version, you need to customize the `Run C/C++test` action to enable generating SARIF reports:
@@ -321,7 +321,7 @@ This section describes how to customize the `Run C/C++test` action to run code a
321
321
Use the `commandLinePattern` parameter to modify the command line for `cpptestcli` executable. The command line pattern depends on your project and the setup of the workspace. Example:
322
322
```yaml
323
323
- name: Run C/C++test
324
-
uses: parasoft/run-cpptest-action@2.0.1
324
+
uses: parasoft/run-cpptest-action@2.0.2
325
325
with:
326
326
# C/C++test workspace will be created in '../workspace'.
327
327
# C/C++test will create a new project based on the provided .bdf file.
@@ -333,7 +333,7 @@ Note: The `compilerConfig` and `reportFormat` action parameters are not directly
333
333
Create a `config.properties` file with additional configuration options for C/C++test Professional, such as reporting options, compiler configuration etc. Then pass the configuration file to `cpptestcli` with the `-localsettings config.properties` option:
334
334
```yaml
335
335
- name: Run C/C++test
336
-
uses: parasoft/run-cpptest-action@2.0.1
336
+
uses: parasoft/run-cpptest-action@2.0.2
337
337
with:
338
338
# C/C++test will use options from 'config.properties'.
0 commit comments