Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 997 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 997 Bytes

ITK clang-format linter action

This GitHub Action checks consistent of the pushed source code with ITK's Coding Style as specified by its .clang-format style configuration file.

Usage

Add the following configuration to your project's repository at, e.g., .github/workflows/clang-format-linter.yml.

on: [push,pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
      with:
        fetch-depth: 1
    - uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@master

The linter check will fail on a pull request if style changes are required.

See Also

When used with ITKApplyClangFormatAction, a custom error can be provided,

    - uses: InsightSoftwareConsortium/ITKClangFormatLinterAction@master
      with:
        error-message: 'Code is inconsistent with ITK Coding Style. Add the *action:ApplyClangFormat* PR label to correct.'