Skip to content

Commit 2698588

Browse files
Added some minor thoughts and version nrs
1 parent 5426f51 commit 2698588

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ They all work but have different bugs, which hopefully are detected by the suppo
66

77
Let's see.
88

9+
NOTE: positives.c and ptrs.c contain some errors / memory leaks I wilfully introduced.
10+
911

1012
## Run tests
1113

@@ -42,18 +44,24 @@ https://github.com/Eliot-Roxbergh/static_analysis/actions/workflows/cmake.yml
4244

4345
#### Manually
4446

45-
It's also possible to run clang-tidy locally via make, such as:
47+
It is also possible to run clang-tidy locally (as opposed to in the CI pipeline)
4648

4749
```
4850
make codechecker-html
4951
```
52+
or
53+
```
54+
make clean
55+
CodeChecker log --build "make" --output ./compile_commands.json
56+
CodeChecker analyze ./compile_commands.json --enable sensitive --ctu --clean --output ./reports
57+
```
5058

5159
And for interactive view:
5260

5361
```
5462
CodeChecker server &
5563
CodeChecker store ./reports -n my-project
56-
firefox localhost:8001
64+
firefox localhost:8001 &
5765
```
5866

5967

@@ -91,6 +99,11 @@ So running fewer tools we would not have found all these faults, what are we mis
9199
CodeChecker reports many useful errors (memory errors and other important problems), but some false positives.
92100
As we use its sensitive setting, we get a few extra LOW and MEDIUM warnings (can be tweaked a lot).
93101

102+
I was suprised to see that it did not complain of cert-err33-c, i.e. we do not check the return values of snprintf (et al.). Perhaps I have a too old version, as I've seen this warning in other situations. I think this is a warning which we could try to enable in the future...
103+
104+
CodeChecker 6.19.1
105+
clang(-tidy) 7.0.0
106+
94107
```
95108
-----------------------------------------------------------------------
96109
Checker name | Severity | Number of reports : True Positives (my approximation)
@@ -149,6 +162,7 @@ good input that other tools largely ignored.
149162

150163
For instance, a bit silly to always complain on the use of strlen or memcpy, but still might be a good idea to use the safer strlen_s and memcpy_s.
151164

165+
(ran online via this Github CI pipeline, 2022-03-22)
152166

153167
```
154168
Unique
@@ -189,7 +203,7 @@ Detected by other tools
189203
[Critical] positives.c:22 // Bug! Likely overrunning write
190204
```
191205

192-
206+
(ran online via this Github CI pipeline, 2022-03-22)
193207

194208
## Extras
195209

0 commit comments

Comments
 (0)