Skip to content

Commit cb1c64f

Browse files
committed
Tools: Modify parallel commands
To avoid hitting a limit on number of arguments
1 parent 0f3f5bc commit cb1c64f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/tools/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ This helps to apply the [Include What You Use](https://github.com/AliceO2Group/O
6969
Here is an example of how to run the `misc-include-cleaner` check in parallel on all `.h`, `.cxx`, `.C` files in the current directory.
7070

7171
```bash
72-
parallel "clang-tidy --fix -checks=-*,misc-include-cleaner {}; echo \"{} \$?\"" ::: "$(find . -name "*.h" -o -name "*.cxx" -o -name "*.C")" > "clang-tidy.log"
72+
find . -name "*.h" -o -name "*.cxx" -o -name "*.C" | parallel "clang-tidy --fix -checks=-*,misc-include-cleaner {}; echo \"{} \$?\"" > "clang-tidy.log"
7373
```
7474

7575
The [`parallel`](https://www.gnu.org/software/parallel/) command is used to parallelise the execution of the `clang-tidy` command for all files.
@@ -100,7 +100,7 @@ The report will be stored in the `err.log` file.
100100
To run a parallelised analysis of all `.h`, `.cxx`, `.C` files in the current directory, execute:
101101

102102
```bash
103-
parallel "cppcheck --language=c++ --std=c++20 --enable=style --check-level=exhaustive --suppressions-list=cppcheck_config {}" ::: "$(find . -name "*.h" -o -name "*.cxx" -o -name "*.C")" 2> "err.log"
103+
find . -name "*.h" -o -name "*.cxx" -o -name "*.C" | parallel "cppcheck --language=c++ --std=c++20 --enable=style --check-level=exhaustive --suppressions-list=cppcheck_config {}" 2> "err.log"
104104
```
105105

106106
Note: It is possible to parallelise the execution with the `-j` option instead but it usually produces less results than analysing files independently.

0 commit comments

Comments
 (0)