Skip to content

Commit 3ea723c

Browse files
committed
build: skip .png files in format checking
grep reports both whitespace and dos formatting error on .png files, eg. File found with trailing whitespace: doc/images/Figure_erasure_code_update.png File found with dos formatting: doc/images/Figure_erasure_code_update.png This patch skips format checking on .png files. Signed-off-by: Guodong Xu <[email protected]>
1 parent 57846f4 commit 3ea723c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/check_format.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ fi
4343
if hash grep; then
4444
echo "Checking for dos and whitespace violations..."
4545
for f in $(git ls-files); do
46+
if [[ $f =~ .*png ]]; then
47+
continue
48+
fi
4649
[ "$verbose" -gt 0 ] && echo "checking whitespace on $f"
4750
if grep -q '[[:space:]]$' $f ; then
4851
echo " File found with trailing whitespace: $f"

0 commit comments

Comments
 (0)