Skip to content

Commit f06e75f

Browse files
committed
Add GitHub cpp-linter-action
1 parent 9f99f85 commit f06e75f

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/cpp-linter.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: C++ Linter
19+
20+
on:
21+
pull_request:
22+
paths-ignore:
23+
- '.github/**'
24+
- 'ci/**'
25+
- 'cmake_modules/**'
26+
branches:
27+
- main
28+
29+
jobs:
30+
cpp-linter:
31+
runs-on: ubuntu-24.04
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: cpp-linter/cpp-linter-action@v2.13.3
35+
id: linter
36+
continue-on-error: true
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
style: file
41+
tidy-checks: file
42+
files-changed-only: true
43+
lines-changed-only: true
44+
thread-comments: true
45+
ignore: 'build|cmake_modules|ci'
46+
database: build/compile_commands.json
47+
- name: Fail fast?!
48+
if: steps.linter.outputs.checks-failed != 0
49+
run: |
50+
echo "some linter checks failed. ${{ steps.linter.outputs.checks-failed }}"
51+
exit 1

.github/workflows/license_check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# under the License.
1717

1818
name: "Run License Check"
19+
1920
on: pull_request
2021

2122
jobs:

0 commit comments

Comments
 (0)