mirror of
https://github.com/EttusResearch/uhd.git
synced 2026-10-25 17:36:10 +00:00
This adds two tools to the ./tools/ subdirectory:
== clang-formatter.sh ==
This is simply a small shell script that can be executed from the top of
the UHD repository, and it will format all files according the the
.clang-format file. It can be executed as such:
$ CLANG_FORMAT=clang-format-14 ./tools/clang-formatter.sh apply
Specifying a clang-format executable is optional, but note that
clang-format 14.0 should be used.
== run-clang-format.py ==
This is a Python script that is a modified version from
https://github.com/gnuradio/clang-format-lint-action/blob/ \
0b0cb14cf220a070d2a8b2610bd74ad1546252a1/run-clang-format.py
It was modified to add --patch-file option.
Alongside this file is a .clang-format-ignore file, which is sourced
from this script. The command can be run as such:
$ ./tools/run-clang-format.py \
--clang-format-executable clang-format-14 \
--extensions c,cpp,h,hpp,hpp.in,ipp \
-r \
--patch-file format.patch \
/path/to/uhd-repo
It will provide both a nice output summary as well as a patch file that
can be consumed with `patch -p0 < format.patch`.
19 lines
237 B
Plaintext
19 lines
237 B
Plaintext
./host/cmake
|
|
./host/lib/deps
|
|
./mpm/lib/mykonos
|
|
./mpm/lib/rfdc
|
|
./mpm/include/mpm/rfdc
|
|
./mpm/tools
|
|
./fpga
|
|
./tools
|
|
./firmware
|
|
*cdecode.*
|
|
*getopt.*
|
|
*_generated.h
|
|
*template_lvbitx.*
|
|
# Ignore all the junk
|
|
.git
|
|
.vscode
|
|
./host/build
|
|
.ccls-cache
|