A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cpp-linter.github.io/cpp-linter-action/ below:

C/C++ Linter Action

C/C++ Linter Action | clang-format & clang-tidy

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 (with tidy-review or format-review).

Warning

We only support Linux runners using a Debian-based Linux OS (like Ubuntu and many others).

MacOS and Windows runners are supported as well.

Usage

Create a new GitHub Actions workflow in your project, e.g. at .github/workflows/cpp-linter.yml

The content of the file should be in the following format.

    steps:
      - uses: actions/checkout@v5
      - uses: cpp-linter/cpp-linter-action@v2
        id: linter
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          style: 'file'  # Use .clang-format config file
          tidy-checks: '' # Use .clang-tidy config file
          # only 'update' a single comment in a pull request thread.
          thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
      - name: Fail fast?!
        if: steps.linter.outputs.checks-failed > 0
        run: exit 1

For all explanations of our available input parameters and output variables, see our Inputs and Outputs document.

See also our example recipes.

Used By

Microsoft   Apache   NASA   Samsung   TheAlgorithms   CachyOS  
Nextcloud   Jupyter   NNStreamer   imgproxy   Zondax   AppNeta  
Chocolate Doom and many more.

Example Annotations

Using file-annotations:

clang-format annotations

clang-tidy annotations

Using thread-comments:

Step Summary

Using step-summary:

Pull Request Review Only clang-tidy

Using tidy-review:

Only clang-format

Using format-review:

Add C/C++ Linter Action badge in README

You can show C/C++ Linter Action status with a badge in your repository README

Example

[![cpp-linter](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/cpp-linter.yml/badge.svg)](https://github.com/cpp-linter/cpp-linter-action/actions/workflows/cpp-linter.yml)

Have question or feedback?

To provide feedback (requesting a feature or reporting a bug) please post to issues.

License

The scripts and documentation in this project are released under the MIT License


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4