Skip to content

Instantly share code, notes, and snippets.

@openm1ke
Created January 4, 2023 13:46
Show Gist options
  • Select an option

  • Save openm1ke/4d8cdf17962d37847f9ff65f692f90ba to your computer and use it in GitHub Desktop.

Select an option

Save openm1ke/4d8cdf17962d37847f9ff65f692f90ba to your computer and use it in GitHub Desktop.
CPP Linter
#!/bin/bash
if [ -z $1 ]; then
echo "Cpplint - No input file!"
exit
fi
DIR_PATH=$(pwd)
if [ ! -f $DIR_PATH/cpplint.py ]; then
cp ~/help_files/cpplint.py $DIR_PATH/
fi
if [ ! -f $DIR_PATH/CPPLINT.cfg ]; then
cp ~/help_files/CPPLINT.cfg $DIR_PATH/
fi
python3 cpplint.py --extensions=c $1
rm $DIR_PATH/cpplint.py $DIR_PATH/CPPLINT.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment