Skip to content
Snippets Groups Projects
Commit 916dcc85 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

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

parent 0e6df58c
Branches
Tags
No related merge requests found
#!/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 @@ ...@@ -8,6 +8,6 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
git grep --count -P '\s+$' -- $@ git grep --count -P '\s+$' -- "$@"
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment