Skip to content

Commit c70082d

Browse files
committed
feat(lint): Add lint to CI include checking for cmake-format,clang-forma and license header
1 parent 4c199bc commit c70082d

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

.github/workflows/build_test.yml

+17
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# SPDX-License-Identifier: Apache-2.0
12
name: Ubuntu Build & Test
23

34
on:
@@ -7,6 +8,22 @@ on:
78
branches: [main]
89

910
jobs:
11+
check:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
submodules: recursive
18+
- name: Setup Ubuntu
19+
run: ./scripts/setup-ubuntu.sh
20+
- name: Check License Header
21+
uses: apache/skywalking-eyes/[email protected]
22+
- name: Check CMake files
23+
run: find . \( -name '*.cmake' -o -name 'CMakeLists.txt' \) -exec cmake-format $* {} +
24+
- name: Clang-tidy
25+
run: python3 scripts/run-clang-tidy.py "." "build" "third_party,scripts,docker,cmake_modules" "h,hpp,cc,cpp"
26+
- run: mkdir build
1027
build:
1128
runs-on: ubuntu-latest
1229

.licenserc.yaml

+11-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
header:
22
license:
33
spdx-id: Apache-2.0
4-
copyright-owner: Apache Software Foundation
4+
content: |
5+
SPDX-License-Identifier: Apache-2.0
56
67
paths-ignore:
7-
- 'dist'
8-
- 'licenses'
8+
- '.github'
9+
- '.gitignore'
10+
- '.gitmodules'
11+
- '.clang-format'
12+
- '.clang-tidy'
13+
- '.licenserc.yaml'
914
- '**/*.md'
10-
- 'LICENSE'
11-
- 'NOTICE'
15+
- '**/*.json'
16+
- '**/*.log'
1217

13-
comment: on-failure
18+
comment: never

src/substrait/proto/update_proto_package.pl

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/perl -w
2+
# SPDX-License-Identifier: Apache-2.0
23

34
# Renames package declarations for protobuffers from substrait to substrait.proto.
45
# This allows us to modify where the generated C++ have their definitions without

src/substrait/textplan/SymbolTable.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* SPDX-License-Identifier: Apache-2.0 */
12
#include <any>
23
#include <map>
34
#include <string>

0 commit comments

Comments
 (0)