Created
January 4, 2023 13:46
-
-
Save openm1ke/4d8cdf17962d37847f9ff65f692f90ba to your computer and use it in GitHub Desktop.
CPP Linter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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