-
Notifications
You must be signed in to change notification settings - Fork 707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang-tidy #5938
Comments
I don't know the examples, but I would probably not do that and keep those warnings.
that would be ideal, of course. |
@davydden you can not have both, I think: either we use CI to enforce 0 clang-tidy warnings or we are okay with leaving some warnings in the code. |
I thought we can check if we get new warnings. EDIT: But if that's not possible, I agree that it's ok to silence a few existing once. |
oh, that is a bit more difficult to do. |
@tjhei How did you enable clang-tidy? By setting the CMake target property? |
@tamiko Option 1: Option 2: enable with Option 3: use |
Option 4: we add an option "DEAL_II_WITH_CLANG_TIDY=ON" that sets |
Honestly, I prefer option 1 - just setting the cmake variable on the command line. There is so much we would have to put into a proper feature configuration (check for compiler, check for executable, etc.) - further we would have to decide on a set of clang-tidy options. |
I don't understand. Do you mean 1 or 4?
That is what we want to do anyways. Without agreeing on a set of options, it is impossible to setup and use clang-tidy by yourself. |
Huh? For which option would you need to do that? All of the options above are 5-10 lines of bash or CMake code. |
- Avoid making copies of DeclException arguments - remove some unused exceptions - adjust arguments (need additional const for char*) - cleanup/simplify string concat that clang-tidy complains about relates dealii#5938
@tjhei My comment sounded a bit stronger than I expected. I would prefer a bash script (in |
oh, that makes sense now! ;-) Patch incoming soon. |
The checks we are currently using are:
What else should we add? |
There is now a nightly clang-tidy run that is submitting to cdash. The clang-tidy messages show up as warnings. Example: https://cdash.kyomu.43-1.org/viewBuildError.php?type=1&buildid=15986 |
@masterleinad and I have been playing with clang-tidy and we have a couple questions:
mpi-*,performance-*
, anything else?// NOLINT
in the specific line of code. Are people okay with this to get down to zero?For context: a clang-tidy run takes about the same time as a full compile run for the whole code base.
The text was updated successfully, but these errors were encountered: