scan_printf.sh 296 B

12345678910111213
  1. #!/bin/bash
  2. grep \
  3. --include=\*.{c,cpp,h} \
  4. --exclude={pstdint,m3d}.h \
  5. -rnw include code \
  6. -e '^\s*printf'
  7. if [ $? -eq 0 ]; then
  8. echo "Debug statement(s) detected. Please uncomment (using single-line comment), remove, or manually add to exclude filter, if appropriate"
  9. exit 1
  10. fi