Skip to content

A Github Action for linting C/C++ code integrating clang-tidy and clang-format to collect feedback provided in the form of file-annotations, thread-comments, workflow step-summary, and Pull Request reviews.

License

Notifications You must be signed in to change notification settings

cpp-linter/cpp-linter-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C/C++ Lint Action

Github Actions for linting the C/C++ code. Integrated clang-tidy, clang-format checks.

Integration with GitHub Actions

Just create a yml file under your GitHub repository. For example .github/workflows/cpp-linter.yml

name: cpp-linter on: [pull_request] jobs: cpp-linter: name: cpp-linter runs-on: ubuntu-latest steps: - name: C/C++ Lint Action uses: shenxianpeng/cpp-linter-action@master with: fetch-depth: 0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Results of GitHub Actions

Here is a test repository cpp-linter-action-demo which has added cpp-linter.yml. when an unformatted c/c++ source file was committed and create a Pull Request will automatically recognize and add warning comments.

For example, this PR #7, and warning message like below:

github-actions bot

Please feel free to commit code to the demo repo and create a Pull Request to see how the process works.

If you have any suggestions or contributions, welcome to PR here.

About

A Github Action for linting C/C++ code integrating clang-tidy and clang-format to collect feedback provided in the form of file-annotations, thread-comments, workflow step-summary, and Pull Request reviews.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 15