GrapheneOS / hardened_malloc

Hardened allocator designed for modern systems. It has integration into Android's Bionic libc and can be used externally with musl and glibc as a dynamic library for use on other Linux-based platforms. It will gain more portability / integration over time.
https://grapheneos.org/
MIT License
1.26k stars 96 forks source link

Run clang-tidy in the CI #170

Closed jvoisin closed 2 years ago

jvoisin commented 2 years ago

Run clang-tidy in the CI, and also fix an implementation-defined cast to make it run.

thestinger commented 2 years ago

I don't really want CI to fail based on clang-tidy because it has so many annoying warnings and false positives. Ubuntu's version is also quite a bit older than the current one so it's missing most of what I see when I run it locally.

thestinger commented 2 years ago

It makes sense to clean it up every now and then but I usually silence most of the checks rather than changing anything since I disagree with them or the rules are impractical for writing real world code. For example, it currently has a new bugprone-easily-swappable-parameters check that's complaining about functions taking multiple integer parameters since they can be easily swapped. That's all well and good to complain about but totally impractical to have as an enforced check. I find most of the checks are that way. It's a disappointing tool so far and I don't really think it has ever found any real issues.

thestinger commented 2 years ago

I made the change to ffzl since unsigned makes more sense and it silences the warning but I don't really want to get notices about clang tidy failing since it's an annoyance more often than an aid.