Skip to content

Commit

Permalink
autoformat
Browse files Browse the repository at this point in the history
  • Loading branch information
aremmell committed Jan 7, 2024
1 parent 2d70c89 commit fd8435d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions autoformat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ run_cppi()
{
printf '%s' "Formatting with cppi ... "
( # shellcheck disable=SC2038
find . -name "*.[ch]" -o -name "*.cc" -o -name "*.hh" | \
xargs -I{} "${SHELL:-sh}" -c \
'set -e; cppi "{}" > "{}.cppi" && mv -f "{}.cppi" "{}"'
find . -name "*.[ch]" -o -name "*.cc" -o -name "*.hh" -print | \
grep -Ev '(mcmb\.c|\.git/.*)' | \
xargs -I{} "${SHELL:-sh}" -c \
'set -e; cppi "{}" > "{}.cppi" && mv -f "{}.cppi" "{}"'
) && printf '%s\n' "complete."
}

Expand Down
4 changes: 2 additions & 2 deletions tests/tests++.hh
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ namespace bal::tests

/** Handles an expected exception. */
# if defined(source_location)
# define _BAL_TEST_ON_EXPECTED_EXCEPTION(ex) \
# define _BAL_TEST_ON_EXPECTED_EXCEPTION(ex) \
source_location loc = source_location::current(); \
_BAL_TEST_LOG_EXPECTED_EXCEPTION(loc.function_name(), ex.what())
# else
# define _BAL_TEST_ON_EXPECTED_EXCEPTION(ex) \
# define _BAL_TEST_ON_EXPECTED_EXCEPTION(ex) \
_BAL_TEST_LOG_EXPECTED_EXCEPTION(__func__, ex.what())
# endif

Expand Down

0 comments on commit fd8435d

Please sign in to comment.