#!/bin/bash if [ $# -lt 1 ]; then echo 'requires input file' exit 1; fi ./cpplint.py --clint $1 &> OUTPUT1 sed -i '/strtok_r/d' OUTPUT1 sed -i '/Using sizeof/d' OUTPUT1 sed -i '/No copyright/d' OUTPUT1 sed -i '/At least two spaces is best between code and comments/d' OUTPUT1 sed -i '/Tab found; better to use spaces/d' OUTPUT1 sed -i '/Could not find a newline character at the end of the file. [whitespace/ending_newline]/d' OUTPUT1 if [ `wc -l < OUTPUT1` -gt 3 ]; then echo 'linter failed on given file' cat OUTPUT1 rm -f OUTPUT1 exit 1; fi rm -f OUTPUT1 exit 0;