mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
bin/tools/pre-commit-hook: Added banner check for case files
Also fixed the formatting of the banners in the tutorials
This commit is contained in:
@ -91,6 +91,15 @@ scriptBanner="(\
|
||||
)*?
|
||||
#------------------------------------------------------------------------------"
|
||||
|
||||
dictBanner="\
|
||||
/\*--------------------------------\*- C\+\+ -\*----------------------------------\*\\\\
|
||||
\| ========= \| \|
|
||||
\| \\\\\\\\ / F ield \| OpenFOAM: The Open Source CFD Toolbox \|
|
||||
\| \\\\\\\\ / O peration \| Version: dev \|
|
||||
\| \\\\\\\\ / A nd \| Web: www\.OpenFOAM\.org \|
|
||||
\| \\\\\\\\/ M anipulation \| \|
|
||||
\\\\\*---------------------------------------------------------------------------\*/"
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@ -385,11 +394,11 @@ checkBanner()
|
||||
badFiles=$(
|
||||
for f in $fileList
|
||||
do
|
||||
# Source files
|
||||
if git grep -q -e "Copyright (C) [0-9-]\+ OpenFOAM Foundation" $scopeGrep"$f"
|
||||
then
|
||||
case "$f" in
|
||||
(*.c|*.C|*.Cver|*.cxx|*.dox|*.H|*.h)
|
||||
# C++ Source
|
||||
if ! git show $scopeShow"$f" | pcregrep -q -M "$sourceBanner"
|
||||
then
|
||||
echo $f
|
||||
@ -407,6 +416,14 @@ checkBanner()
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Case files
|
||||
elif git grep -q -e "^FoamFile" $scopeGrep"$f"
|
||||
then
|
||||
if ! git show $scopeShow"$f" | pcregrep -q -M "$dictBanner"
|
||||
then
|
||||
echo $f
|
||||
fi
|
||||
fi
|
||||
done
|
||||
)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM:.Uhe Open Source CFD Toolbox |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM:.khe Open Source CFD Toolbox |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM:.phe Open Source CFD Toolbox |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*-----------------------------*-C++-*---------------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------* \
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------* \
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.com |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*-----------------m---------------*- C++ -*----------------------------------*\
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------* \
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
n| \\/ M anipulation | |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------* \
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
|
||||
@ -1,3 +1,10 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
| \\ / A nd | Web: www.OpenFOAM.org |
|
||||
| \\/ M anipulation | |
|
||||
\*---------------------------------------------------------------------------*/
|
||||
FoamFile
|
||||
{
|
||||
version 2.0;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
/*--------------------------------*- C++ -*----------------------------------* \
|
||||
/*--------------------------------*- C++ -*----------------------------------*\
|
||||
| ========= | |
|
||||
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
|
||||
| \\ / O peration | Version: dev |
|
||||
|
||||
Reference in New Issue
Block a user