Commit 916dcc85 authored by Mark Olesen's avatar Mark Olesen

ENH: bin/tools/git-find-non-ascii: find non-ASCII chars in source code

parent 0e6df58c
#!/bin/sh
#------------------------------------------------------------------------------
# Script
# git-find-non-ascii
#
# Description
# Use git grep to find source files with non-ASCII characters.
# Use cached files for speed.
#
# C files: .c .h
# C++ files: .C .cc .cpp .cxx .H .hh .hpp .hxx
#
#------------------------------------------------------------------------------
git grep --cached --line-number -P '[\x00-\x08\x0E-\x1F\x80-\xFF]'
-- \
'*.[CHch]' \
'*.cc' \
'*.hh' \
'*.[ch]pp' \
'*.[ch]xx'
#------------------------------------------------------------------------------
......@@ -8,6 +8,6 @@
#
#------------------------------------------------------------------------------
git grep --count -P '\s+$' -- $@
git grep --count -P '\s+$' -- "$@"
#------------------------------------------------------------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment