mirror of
https://github.com/awsdocs/aws-doc-sdk-examples.git
synced 2026-03-26 06:22:18 +00:00
31 lines
827 B
YAML
31 lines
827 B
YAML
name: "Lint C++"
|
|
on: # yamllint disable-line rule:truthy
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
cpplint:
|
|
name: Lint CPP
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout files
|
|
uses: actions/checkout@v4
|
|
with:
|
|
sparse-checkout: |
|
|
.github
|
|
cpp
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: tj-actions/changed-files@e9772d140489982e0e3704fea5ee93d536f1e275
|
|
with:
|
|
files: "cpp/**/*.{cpp,h}"
|
|
- name: "Run clang-tidy check"
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
uses: ./.github/sd-cpp-linter
|
|
with:
|
|
config_file: ./.github/cpp-linter/clang-tidy-config.txt
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|