Skip to content

bang-olufsen/github-cppcheck

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

github-cppcheck

License

Shell script for running the Cppcheck static code analysis tool for C/C++ source files. The script can either be executed from your build script or as part of GitHub pull requests with status updates (pending, success and failure). This makes it possible to add cppcheck as a required CI step on GitHub. Currently only Shippable CI and GitHub Actions is supported for knowing the repository, branch and linking to build logs.

Input can either be a directory (e.g. ".") or specific files. For pull requests the special "diff" command can be parsed as argument to check only the changed files.

When all files are checked (e.g. as part of nightly builds) the Cppcheck badge is updated for the particular repository and branch. The badge is afterwards uploaded to Dropbox. For displaying the badge on your README.md copy the Dropbox link to the image and replace www.dropbox.com with dl.dropboxusercontent.com. The color of the badge will be red in case of errors, yellow in case of only warnings and green if no bugs have been found.

False positives can be suppressed using the cppcheck.txt file which must be located in the directory from where the script is executed. You can run the shell script directly from GitHub using:

bash <(curl -s https://raw.githubusercontent.com/bang-olufsen/github-cppcheck/master/cppcheck.sh) .

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages