Skip to content

Releases: RafikFarhad/clang-format-github-action

v4

22 Jan 12:55
873e2c4
Compare
Choose a tag to compare

What's Changed

Full Changelog: 3.2.0...v4

v3.2

12 Nov 11:14
4a04d8e
Compare
Choose a tag to compare

Changelog

  • Fixes (#7)
  • Added CI Test

v3.1

12 Nov 05:58
212967e
Compare
Choose a tag to compare

Changelog

  • Only add excludes to find command if it's defined (#9)
  • Improve ReadMe (#8)

Contirbutor

v3

25 Nov 16:09
0061b39
Compare
Choose a tag to compare

Chnagelog

  • Clang format version 14 support

Contirbutor

v2.1.0

04 Apr 18:56
98bdbc5
Compare
Choose a tag to compare

Clang Format Github Action

Version v2.1.0

Change log:

  • exclude support (Thanks @aadeg)

Clang Format Github Action

An action that check code format using clang-format tool. Suitable for project built on C, C++, C#, Objective-C.

Clang: a C language family frontend for LLVM

Feature:

  • It automatic checks the source file's code format, and if there is any code format violation, it exits with a nonzero status.
  • Suggest commands for fixing the formation violated file.

Inputs

sources

Sources to check by this action. It can be a single file, regex of a folder or multiple selecteor seprated by comma (,).

Default: "**/*". That means all files in this repository.

Example: If your repository contains many files other than C file, you can try with specific extension like:

"src/*.h,src/*.c"

or, for all nested folder

"src/**/*.h,src/**/*.c"

style

The style for clang-format. Possible value are: LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit. If your repository has a .clang-format file in the root directory then you can use file option here.

Default: LLVM

Sample Workflow File

Create a file in .github/workflows/ folder with:

name: Clang Format Checker
on: [push]
jobs:
  clang-format-checking:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: RafikFarhad/clang-format-github-action@v2.1.0
        with:
          sources: "src/**/*.h,src/**/*.c,test/**/*.c"

It will check for code formation violation on every push to GitHub.

Version

This action uses clang-format version 12.

Kudos to

Older Clang Version

If you want to use clang version 10, use v1.0.1 of this action.

Contribution

Feel free to submit PR and/or raise issue.

🌞 Thanks for using 🌞

v2.0.0

11 Mar 16:15
e3bd1b8
Compare
Choose a tag to compare

Clang Format Github Action

Version v2.0.0

Change log:

  • Upgrade clang-format version to 12 (@LinkTed)

Clang Format Github Action

An action that check code format using clang-format tool. Suitable for project built on C, C++, C#, Objective-C.

Clang: a C language family frontend for LLVM

Feature:

  • It automatic checks the source file's code format, and if there is any code format violation, it exits with a nonzero status.
  • Suggest commands for fixing the formation violated file.

Inputs

sources

Sources to check by this action. It can be a single file, regex of a folder or multiple selecteor seprated by comma (,).

Default: "**/*". That means all files in this repository.

Example: If your repository contains many files other than C file, you can try with specific extension like:

"src/*.h,src/*.c"

or, for all nested folder

"src/**/*.h,src/**/*.c"

style

The style for clang-format. Possible value are: LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit. If your repository has a .clang-format file in the root directory then you can use file option here.

Default: LLVM

Sample Workflow File

Create a file in .github/workflows/ folder with:

name: Clang Format Checker
on: [push]
jobs:
  clang-format-checking:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: RafikFarhad/clang-format-github-action@v2.0.0
        with:
          sources: "src/**/*.h,src/**/*.c,test/**/*.c"

It will check for code formation violation on every push to GitHub.

Version

This action uses clang-format version 10.
Kudos to @silkeh for his awesome docker image.

Contribution

Feel free to submit PR and/or raise issue.

🌞 Thanks for using 🌞

Version v1.0.1

14 May 09:37
4e49929
Compare
Choose a tag to compare

Clang Format Github Action

Version 1.0.1

Change log:


Clang Format Github Action

An action that check code format using clang-format tool. Suitable for project built on C, C++, C#, Objective-C.

Clang: a C language family frontend for LLVM

Feature:

  • It automatic checks the source file's code format, and if there is any code format violation, it exits with a nonzero status.
  • Suggest commands for fixing the formation violated file.

Inputs

sources

Sources to check by this action. It can be a single file, regex of a folder or multiple selecteor seprated by comma (,).

Default: "**/*". That means all files in this repository.

Example: If your repository contains many files other than C file, you can try with specific extension like:

"src/*.h,src/*.c"

or, for all nested folder

"src/**/*.h,src/**/*.c"

style

The style for clang-format. Possible value are: LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit. If your repository has a .clang-format file in the root directory then you can use file option here.

Default: LLVM

Sample Workflow File

Create a file in .github/workflows/ folder with:

name: Clang Format Checker
on: [push]
jobs:
  clang-format-checking:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: RafikFarhad/clang-format-github-action@v1.0.1
        with:
          sources: "src/**/*.h,src/**/*.c,test/**/*.c"

It will check for code formation violation on every push to GitHub.

Version

This action uses clang-format version 10.
Kudos to @silkeh for his awesome docker image.

Contribution

Feel free to submit PR and/or raise issue.

🌞 Thanks for using 🌞

Version 1.0.0

14 Jul 11:49
v1
d93d8bf
Compare
Choose a tag to compare

Clang Format Github Action

An action that check code format using clang-format tool. Suitable for project built on C, C++, C#, Objective-C.

Clang: a C language family frontend for LLVM

Feature:

  • It automatic checks the source file's code format, and if there is any code format violation, it exits with a nonzero status.
  • Suggest commands for fixing the formation violated file.

Inputs

sources

Sources to check by this action. It can be a single file, regex of a folder or multiple selecteor seprated by comma (,).

Default: "**/*". That means all files in this repository.

Example: If your repository contains many files other than C file, you can try with specific extension like:

"src/*.h,src/*.c"

or, for all nested folder

"src/**/*.h,src/**/*.c"

style

The style for clang-format. Possible value are: LVM, Google, Chromium, Mozilla, WebKit. If your repository has a .clang-format file in the root directory then you can use file option here.

Default: LVM

Sample Workflow File

Create a file in .github/workflows/ folder with:

name: Clang Format Checker
on: [push]
jobs:
  clang-format-checking:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: RafikFarhad/clang-format-github-action@v1
        with:
          sources: "src/**/*.h,src/**/*.c,test/**/*.c"

It will check for code formation violation on every push to GitHub.

Version

This action uses clang-format version 10.
Kudos to @silkeh for his awesome docker image.

Contribution

Feel free to submit PR and raise issue.

🌞 Thanks for using 🌞