Skip to content

Warning

You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?

clang-format lint

Actions
Github Action that check if code is formatted correctly using clang-format
v0.3
Pre-release
Star (136)

clang-format lint action

This action checks if the source code matches the .clang-format file.

Inputs

source

Where the soruce files are located.
Default: '.' (current folder)
Example: './src'

exclude

What folder should be exlcuded from format checking.
Default: 'none'
Example: './third_party'

extensions

What extensions should be used from format checking.
Default: 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx'
Example: 'cpp,h'

Example usage

name: test-clang-format

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - uses: ./.github/actions/test-clang-format
      with:
        source: '.'
        exclude: './third_party'
        extensions: 'h,cpp'

clang-format lint is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Github Action that check if code is formatted correctly using clang-format
v0.3
Pre-release

clang-format lint is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.