HaikuArchives / ArtPaint

ArtPaint is a painting and image processing program.
https://haikuarchives.github.io/ArtPaint/
29 stars 18 forks source link

Clang static analysis #124

Open Vidrep opened 2 years ago

Vidrep commented 2 years ago

Since ArtPaint is getting some recent love, I thought I'd run the Clang static analysis on the code and provide the report here scan-build-2022-04-08-ArtPaint.zip in case there are a few real bugs amongst the false positives.

dsizzle commented 2 years ago

ooh nice, thank you!

Vidrep commented 2 years ago

Here's a zip of the Clang Static Analysis for most recent build I did (June 17, 2022) scan-build-2022-06-17.zip

dsizzle commented 2 years ago

Thanks @Vidrep - I have a couple of changes queued up from last time but I appreciate a more up to date report!

Vidrep commented 2 years ago

After the last batch of commits, the number of bugs found by Clang has dropped from 272 to 206. Here's the latest report. scan-build-2022-06-19.zip

Vidrep commented 2 years ago

We've gone from 206 bugs down to 90. Here's the most recent report. scan-build-2022-06-26.zip

Vidrep commented 1 year ago

From 90 to 58 bugs as of most recent report (attached). scan-build-2022-07-02.zip

Vidrep commented 1 year ago

Here's a clang static analysis build for the latest commit to ArtPaint. Reported bugs - 67. Up from 58 last time. scan-build-2022-09-25.zip

Vidrep commented 1 year ago

Attached is a clang static analysis as of October 2. Bugs found has dropped from 58 to 49. scan-build-2022-10-02.zip

Vidrep commented 1 year ago

Attached a clang static analysis report Nov 20. Bugs found - 57 scan-build-2022-11-20.zip

dsizzle commented 1 year ago

Thanks @Vidrep - I fixed several items, but for the most part the rest of these items are not real issues. I wouldn't call them "bugs."

Vidrep commented 1 year ago

I have attached a clang static analysis zip file for the latest build (March 20, 2023) 60 issues found scan-build-2023-03-20.zip

Vidrep commented 9 months ago

It's been 6 months since my last clang static analysis. For what it's worth, the number of issues is now 84. scan-build-2023-09-19.zip

dsizzle commented 9 months ago

Thanks @Vidrep ! I fixed a bunch of the issues - I always appreciate these reports.

Vidrep commented 8 months ago

Here's one from today Oct 11, 2023 scan-build-2023-10-11.zip

Vidrep commented 7 months ago

Here's your monthly scan ;) 49 issues found. Hope it helps somehow scan-build-2023-11-10.zip

dsizzle commented 7 months ago

@Vidrep, it's very helpful. While there are a number of "false-positives" where clang doesn't quite understand the code, it's definitely beneficial for seeing things I might have missed in code that I changed recently. Particularly with larger code changes, these reports always point out something that should be fixed before release. Thanks!

humdingerb commented 7 months ago

Thanks @Vidrep ! Could you quickly explain how you create these scans, step-by-step. I'd like to try those for other projects. Here, via personal email or forum post, whatever you prefer.

Vidrep commented 7 months ago

Thanks @Vidrep ! Could you quickly explain how you create these scans, step-by-step. I'd like to try those for other projects. Here, via personal email or forum post, whatever you prefer.

Hey humdinger! Sorry for not responding sooner.

Install llvm_clang_analysis and dependencies (usually llvm_clang and llvm**_libs)

To run a scan, simply open a terminal and enter "scan-build make" (or in the case of Artpaint "build.sh") You'll find the html report in your system cache folder once it's complete.

humdingerb commented 7 months ago

Thanks, @Vidrep, that's easy enough. :)