File: scan_printf.sh

package info (click to toggle)
assimp 5.4.3%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 100,104 kB
  • sloc: cpp: 164,162; cobol: 65,664; ansic: 16,520; xml: 11,246; python: 5,311; java: 2,303; sh: 398; objc: 122; pascal: 100; makefile: 66
file content (13 lines) | stat: -rwxr-xr-x 296 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/bash

grep \
  --include=\*.{c,cpp,h} \
  --exclude={pstdint,m3d}.h \
  -rnw include code \
  -e '^\s*printf'

if [ $? -eq 0 ]; then
  echo "Debug statement(s) detected. Please uncomment (using single-line comment), remove, or manually add to exclude filter, if appropriate" 
  exit 1
fi