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
+69-5Lines changed: 69 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
# [CodeChecker](http://github.com/Ericsson/CodeChecker/) C++ Static Analysis action
2
2
3
-
GitHub Action to execute static analysis over C-family projects (C, C++,
4
-
Objective-C) using the [Clang](http://clang.llvm.org/) infrastructure and
5
-
[CodeChecker](http://github.com/Ericsson/CodeChecker/) as its driver.
3
+
GitHub Action to execute static analysis over using [CodeChecker](http://github.com/Ericsson/CodeChecker/) as its driver.
4
+
For C-family projects (C, C++, Objective-C, CUDA, etc.), CodeChecker supports driving the static analysis programs of [Clang](http://clang.llvm.org).
5
+
Several other static analysers' output can be integrated into CodeChecker through the [report converter](http://codechecker.readthedocs.io/en/latest/tools/report-converter/).
6
6
7
-
## Overview
7
+
## Overview (for C-family projects)
8
8
9
9
⚠️ **CAUTION! This action has been written with commands that target Ubuntu-based distributions!**
10
10
@@ -238,6 +238,60 @@ runs:
238
238
exit 1
239
239
```
240
240
241
+
## Overview (for other analyses through the _report-converter_)
242
+
243
+
⚠️ **CAUTION! This action has been written with commands that target Ubuntu-based distributions!**
244
+
245
+
This single action composite script encompasses the following steps:
246
+
247
+
1. Obtain a package of CodeChecker.
248
+
3. Use the `report-converter` to convert other analysers' reports to CodeChecker's format.
249
+
4. Show the analysis results in the CI log, and create HTML reports that can be uploaded as an artefact. (Uploading is to be done by the user!)
250
+
5. _(Optional)_ Check for the current commit introducing new bug reports against a known state. (Good for pull requests!)
251
+
6. _(Optional)_ Upload the results to a running _CodeChecker server_. (Good for the main project!)
252
+
253
+
254
+
ℹ️ **Note:** Static analysis can be a time-consuming process.
255
+
It's recommended that the static analysis step is not sequential with the rest of a CI execution, but either runs as its own job in a workflow, or a completely distinct workflow altogether.
256
+
257
+
Please refer to the documentation of the analyser of your choice for this.
258
+
CodeChecker does **NOT** support driving the analysis through external tools, but if a successful analysis had been done, it can convert and store the results.
259
+
260
+
```yaml
261
+
job:
262
+
steps:
263
+
# Check YOUR project out!
264
+
- name: "Check out repository"
265
+
uses: actions/checkout@v2
266
+
267
+
# Perform the analysis. Details vary between analysers!
| `report-converter` | `false` | If set to `true`, the job will execute _report conversion_ from other analysers instead of driving the static analysis by itself. |
340
+
| `original-analyser` | | The "type" of the analysis that **had been performed** earlier. Passed as mandatory input to the `report-converter` executable. |
341
+
| `original-analysis-output` | | The file or directory where the results of the third-party analyser are available. Passed as mandatory input to the `report-converter` executable. |
342
+
279
343
### Diff configuration
280
344
281
345
🔖 Read more about [`CodeChecker cmd diff`](http://codechecker.readthedocs.io/en/latest/analyzer/web_guide/#cmd-diff) in the official documentation.
@@ -310,7 +374,7 @@ The action exposes the following outputs which may be used in a workflow's steps
| `analyze-output` | Auto-generated, or `analyze-output` input | The directory where the **raw** analysis output files are available. |
377
+
| `analyze-output` | Auto-generated, or `analyze-output` input | The directory where the **raw** analysis output files (either created by the analysers, or by the converter) are available. |
314
378
| `logfile` | Auto-generated, or `logfile` input | The JSON Compilation Database of the analysis that was executed. |
315
379
| `diff-html-dir` | Auto-generated. | The directory where the **user-friendly HTML** bug reports were generated to about the **new** findings (if `diff` was enabled). |
316
380
| `diff-result-log` | Auto-generated. | `CodeChecker cmd diff`'s output log file which contains the **new** findings dumped into it. |
Copy file name to clipboardExpand all lines: action.yml
+52-9Lines changed: 52 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,17 @@ inputs:
47
47
required: true
48
48
default: 'true'
49
49
50
+
report-converter:
51
+
description: 'Whether to perform report conversion from analyses executed by third-party analysers instead of driving the analysis via CodeChecker directly.'
52
+
required: true
53
+
default: 'false'
54
+
original-analyser:
55
+
description: 'The type of the third-party analyser which performed the analysis. Passed to the report converter executable, as a mandatory input parameter.'
56
+
required: false
57
+
original-analysis-output:
58
+
description: 'The location of the analysis data emitted by the third-party analyser. Passed to the report converter executable, as a mandatory input parameter.'
59
+
required: false
60
+
50
61
diff:
51
62
description: 'Whether to enable calculating the different of the current analysis results against a run stored on a CodeChecker server. If enabled, other flags, such as "diff-url" must also be set.'
0 commit comments