mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:23:01 +00:00
[SDK][TOOLS] Add do_code_format.sh to sdk/tools (#2191)
do_code_format.sh --- A command line tool using clang-format
This commit is contained in:
parent
bef5aef62b
commit
f4f010ba50
1 changed files with 35 additions and 0 deletions
35
sdk/tools/do_code_format.sh
Normal file
35
sdk/tools/do_code_format.sh
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# do_code_format.sh
|
||||||
|
|
||||||
|
function version
|
||||||
|
{
|
||||||
|
echo "$(basename ${0}) version 0.0.2"
|
||||||
|
}
|
||||||
|
|
||||||
|
function usage
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
$(basename ${0}) does code formatting.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
$(basename ${0}) [<options>] <files>
|
||||||
|
|
||||||
|
Options:
|
||||||
|
--help print this message
|
||||||
|
--version print $(basename ${0}) version
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
case ${1} in
|
||||||
|
--help)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
|
||||||
|
--version)
|
||||||
|
version
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
clang-format -style=file -i $@
|
Loading…
Add table
Add a link
Reference in a new issue