mirror of https://github.com/CGAL/cgal
Merge branch 'cgal/releases/CGAL-4.14-branch'
whitespace+tab removal, merged with option -Xignore-all-space
This commit is contained in:
commit
0a46621dc6
|
|
@ -466,10 +466,21 @@ protected:
|
||||||
c = m_in->get();
|
c = m_in->get();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
if (c == '\n')
|
||||||
|
{
|
||||||
|
c = m_in->get();
|
||||||
|
if ( c!= '#')
|
||||||
|
{
|
||||||
|
m_in->putback(c);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Skip comment lines that begin with a '#' character.
|
// Skip comment lines that begin with a '#' character.
|
||||||
while (c != EOF && c == '#')
|
while (c != EOF && c == '#')
|
||||||
{
|
{
|
||||||
|
if (c != '\n')
|
||||||
_skip_until_EOL();
|
_skip_until_EOL();
|
||||||
c = m_in->get();
|
c = m_in->get();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,3 @@
|
||||||
#include <CGAL/Barycentric_coordinates_2/Mean_value_2.h>
|
#include <CGAL/Barycentric_coordinates_2/Mean_value_2.h>
|
||||||
|
|
||||||
#endif // CGAL_BARYCENTRIC_COORDINATES_2_H
|
#endif // CGAL_BARYCENTRIC_COORDINATES_2_H
|
||||||
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if ! git diff --exit-code > /dev/null || ! git diff --staged --exit-code > /dev/null ; then
|
||||||
|
echo 'Your working directory contains local modifications!' >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f Installation/include/CGAL/version.h ]; then
|
||||||
|
echo "This script should be run at the root of a CGAL branch" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# replace tabs by two spaces in AABB-tree and Minkowski_sum_2 packages
|
||||||
|
find AABB_tree -name '*.h' -o -name '*.cpp' -o -name '*.txt' | xargs sed -i -E 's/\t/ /g'
|
||||||
|
find Minkowski_sum_2 -name '*.h' -o -name '*.cpp' -o -name '*.txt' | xargs sed -i -E 's/\t/ /g'
|
||||||
|
|
||||||
|
#replace tabs by 8 spaces for all other packages
|
||||||
|
find . -name '*.h' -o -name '*.cpp' -o -name '*.hpp' -o -name '*.tcc' -o -name '*.txt' | xargs sed -i -E 's/\t/ /g'
|
||||||
|
|
||||||
|
#remove trailing whitespace
|
||||||
|
find . -name '*.h' -o -name '*.cpp' -o -name '*.hpp' -o -name '*.tcc' -o -name '*.txt' | xargs sed -i -E 's/\s+$//'
|
||||||
|
|
@ -162,6 +162,24 @@ if [ -n "${txt_not_utf8}" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#check no file contains tab characters
|
||||||
|
echo '.. Checking if tab character is used...'
|
||||||
|
file_with_tabs=$(git ls-files --stage | egrep '\.txt|\.h$|\.cpp|\.hpp' | awk '{print $4}' | xargs grep -P -l '\t')
|
||||||
|
if [ -n "${file_with_tabs}" ]; then
|
||||||
|
echo "The following files have tabs:"
|
||||||
|
echo ${file_with_tabs}
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#check no file contains trailing whitespaces characters
|
||||||
|
echo '.. Look for trailing whitespaces...'
|
||||||
|
files_with_trailingws=$(git ls-files --stage | egrep '\.txt|\.h$|\.cpp|\.hpp' | awk '{print $4}' | xargs grep -P -l '\s+$')
|
||||||
|
if [ -n "${files_with_trailingws}" ]; then
|
||||||
|
echo "The following files have trailing whitespaces:"
|
||||||
|
echo ${files_with_trailingws}
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
#check all headers in documentation actually exist
|
#check all headers in documentation actually exist
|
||||||
echo '.. Checking if all documentation headers exist'
|
echo '.. Checking if all documentation headers exist'
|
||||||
not_existing_headers=$(bash ./Scripts/developer_scripts/check_headers.sh $PWD)
|
not_existing_headers=$(bash ./Scripts/developer_scripts/check_headers.sh $PWD)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue