Commit e6c7f2e0 authored by Jonathan Jenkins's avatar Jonathan Jenkins

tweak to reformat tool

parent c3f2c08e
...@@ -67,3 +67,12 @@ Notes on using the clang static analyzer ...@@ -67,3 +67,12 @@ Notes on using the clang static analyzer
- edit Makefile, and delete the "CC = mpicc" (or similar) line - edit Makefile, and delete the "CC = mpicc" (or similar) line
- run "scan-build --use-cc=mpicc make" - run "scan-build --use-cc=mpicc make"
Notes on using uncrustify
-----------------
- version 0.61 is required
- build/install uncrustify from your favorite distro (0.61), OR download from
https://github.com/bengardner/uncrustify and build from source
(configure --prefix /path/to/install && make && make install)
- either use uncrustify directly (see uncrustify --help) or use the provided
reformat.sh tool which is a shim over some of the options (see reformat.sh
-h)
...@@ -18,6 +18,7 @@ USAGE: reformat.sh [-x] [-i] [-c CFG] [-b FILE] {-a | FILE...} ...@@ -18,6 +18,7 @@ USAGE: reformat.sh [-x] [-i] [-c CFG] [-b FILE] {-a | FILE...}
-a: perform recursively on all files ending in .c or .h -a: perform recursively on all files ending in .c or .h
if -a not provided, then perform on all files passed in if -a not provided, then perform on all files passed in
-x: instead of formatting, check if output format is the same as input -x: instead of formatting, check if output format is the same as input
-h: show this help and exit
EOF EOF
} }
...@@ -40,7 +41,7 @@ do_recursive=no ...@@ -40,7 +41,7 @@ do_recursive=no
do_check=no do_check=no
blacklist= blacklist=
while getopts ":ib:ax" opt; do while getopts ":ib:axh" opt; do
case $opt in case $opt in
i) i)
do_inplace=yes do_inplace=yes
...@@ -57,6 +58,10 @@ while getopts ":ib:ax" opt; do ...@@ -57,6 +58,10 @@ while getopts ":ib:ax" opt; do
x) x)
do_check=yes do_check=yes
;; ;;
h)
usage
exit 1
;;
\?) \?)
usage usage
error "invalid argument: -$OPTARG" error "invalid argument: -$OPTARG"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment