Named arguments can be dangerous when they are wrong, because they are not enforced by the compiler. Currently there are only minor typos, no actual bugs.
Fix the typos and add the .clang-tidy
file to make it easier to find them in the future.
Named arguments can be dangerous when they are wrong, because they are not enforced by the compiler. Currently there are only minor typos, no actual bugs.
Fix the typos and add the .clang-tidy
file to make it easier to find them in the future.
To test on Ubuntu:
0apt install clang-tidy bear clang
1./autogen.sh && ./configure --with-incompatible-bdb CC=clang CXX=clang++
2make clean && bear make -j $(nproc) # For bear 2.x
3make clean && bear -- make -j $(nproc) # For bear 3.x
4( cd ./src/ && run-clang-tidy -j $(nproc) )
Is it possibly instead of:
make clean && bear make -j $(nproc)
->
make clean && bear -- make -j $(nproc)
?
(https://github.com/rizsotto/Bear#how-to-use)
edit: I think there are two more instances where the parameter names are not entirely correct:
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
No, that doesn’t work for me:
0bear: Internal error.
1Traceback (most recent call last):
2 File "/usr/local/bin/bear", line 265, in wrapper
3 return function(*args, **kwargs)
4 File "/usr/local/bin/bear", line 291, in intercept_build
5 exit_code, current = capture(args, category)
6 File "/usr/local/bin/bear", line 315, in capture
7 exit_code = run_build(args.build, env=environment)
8 File "/usr/local/bin/bear", line 189, in run_build
9 exit_code = subprocess.call(command, *args, **kwargs)
10 File "/usr/lib64/python3.9/subprocess.py", line 349, in call
11 with Popen(*popenargs, **kwargs) as p:
12 File "/usr/lib64/python3.9/subprocess.py", line 951, in __init__
13 self._execute_child(args, executable, preexec_fn, close_fds,
14 File "/usr/lib64/python3.9/subprocess.py", line 1821, in _execute_child
15 raise child_exception_type(errno_num, err_msg, err_filename)
16FileNotFoundError: [Errno 2] No such file or directory: '--'
17bear: Please run this command again and turn on verbose mode (add '-vvvv' as argument).
My bear version is bear 3.0.8
and I have Ubuntu 21.04. Anyway, bear make -j $(nproc)
does not work for me, only bear -- make -j $(nproc)
. Maybe there was a breaking change in bear
command. I don’t know.
edit: I think there are two more instances where the parameter names are not entirely correct:
Thanks, fixed
Concept ACK
Could add this specific clang-tidy
check as part of the CI lint pass to reduce the risk of introduction of bugprone argument comments going forward?
Could add this specific clang-tidy check as part of the CI lint pass to reduce the risk of introduction of bugprone argument comments going forward?
Seems like something that should be done in a separate pull request to keep the discussion here focussed on adding the flag and fixing the violations.
cr ACK fa57fa1a2e764792b873998ddf38db2ac061dcb6
Could add this specific clang-tidy check as part of the CI lint pass to reduce the risk of introduction of bugprone argument comments going forward?
Seems like something that should be done in a separate pull request to keep the discussion here focussed on adding the flag and fixing the violations.
Makes sense! I’d gladly review such PR FWIW :)