Closed johnfgibson closed 4 years ago
style format failed.
Yeah...can you remind me what the clang-tidy invocation is to test the style?
Never mind, I found my notes.
Merging #23 into master will increase coverage by
0.15%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## master #23 +/- ##
==========================================
+ Coverage 26.69% 26.84% +0.15%
==========================================
Files 64 64
Lines 15694 15727 +33
Branches 6808 6810 +2
==========================================
+ Hits 4189 4222 +33
Misses 11467 11467
Partials 38 38
Impacted Files | Coverage Δ | |
---|---|---|
channelflow/nse.cpp | 65.46% <100.00%> (+2.30%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ac4da84...6857b97. Read the comment docs.
You can find the test in share/qa/style_test.sh The custom style file is in the root directory: ".clang-format" You can run clang-format with -style=file option on the changed files or you can always simply source the following (after replacing the directories with your directory of the code and the clang-format program):
#!/bin/bash
#
# Description:
# This script is used to check style on files that changed
cd ~/Code/channelflow/
changed_since_branching=$(git diff --name-only --diff-filter=ACM ecps... | tr " " "\n" | grep -E "*\.(cpp|hpp|h)")
exit_status=0
if [[ -n "${changed_since_branching}" ]]
then
declare -i total
total=0
echo "Analyzing the following files: "
echo
for file in ${changed_since_branching}
do
declare -i changes
changes=$(/software/clang-6.0.0/bin/clang-format -style=file -output-replacements-xml ${file} | grep -c "<replacement ")
if [[ "${changes}" > 0 ]]
then
/software/clang-6.0.0/bin/clang-format -style=file -i ${file}
fi
total+=changes
echo " ${file}: ${changes} changes needed to conform to style guide"
done
if [[ "${total}" > 0 ]]
then
exit_status=1
echo
echo "Apply changes using clang-format and resubmit"
fi
else
echo "No source file changed"
fi
#exit ${exit_status}
To fix issue #20, in the laminarProfle function, there's a new case for nonzero dPdx or Ubulk, nonzero Vsuck, and |Vsuck H/nu| small. In this case the exponential pressure-ASBL formulae are evaluated via Taylor series expanions in the small parameter Vsuck H/nu. The laminarTest.cpp unit test ha some new code to make sure the function is tested with Vsuck H/nu approaching zero, and across a wider range of magnitudes of other parameters as well.