Closed agarny closed 3 years ago
We will need to modify the CI as this will have an affect there. This will need to be done before this can be merged in otherwise the clang tidy check will no longer function.
Fair enough. Looking forward to the CI being updated then. :)
Seems like #347 was fixed but incorrectly set the default to on :)
Oopsie indeed!
I have updated the CI. This one can be dealt with now. We should check afterwards that the CI is indeed working of course and not just take my word for it.
Testing Clang-Tidy in our CI machine through ee94ffb.
Otherwise, I noticed that our Clang-Tidy checks are somewhat weak (nowadays?). For instance:
ModelPtr otherParent = std::dynamic_pointer_cast<Model>(units->parent());
should be replaced with:
auto otherParent = std::dynamic_pointer_cast<Model>(units->parent());
but now, both are allowed.
Same with:
if (x != nullptr)...
and
if (x) ...
Both are allowed...!?
Ok, Clang-Tidy is properly set on our CI machine. 🥳
Right now, if you have Clang-Tidy installed on your system then our build system will find it and set
LIBCELLML_CLANG_TIDY
toON
. However, to build libCellML with Clang-Tidy is very slow. So, it would be good to have it disabled by default.