Skip to content

Commit

Permalink
feat(lint): Add lint to CI include checking for cmake-format,clang-fo…
Browse files Browse the repository at this point in the history
…rma and license header
  • Loading branch information
chaojun-zhang committed Mar 23, 2023
1 parent 4c199bc commit c70082d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 6 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: Apache-2.0
name: Ubuntu Build & Test

on:
Expand All @@ -7,6 +8,22 @@ on:
branches: [main]

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Ubuntu
run: ./scripts/setup-ubuntu.sh
- name: Check License Header
uses: apache/skywalking-eyes/[email protected]
- name: Check CMake files
run: find . \( -name '*.cmake' -o -name 'CMakeLists.txt' \) -exec cmake-format $* {} +
- name: Clang-tidy
run: python3 scripts/run-clang-tidy.py "." "build" "third_party,scripts,docker,cmake_modules" "h,hpp,cc,cpp"
- run: mkdir build
build:
runs-on: ubuntu-latest

Expand Down
17 changes: 11 additions & 6 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
header:
license:
spdx-id: Apache-2.0
copyright-owner: Apache Software Foundation
content: |
SPDX-License-Identifier: Apache-2.0
paths-ignore:
- 'dist'
- 'licenses'
- '.github'
- '.gitignore'
- '.gitmodules'
- '.clang-format'
- '.clang-tidy'
- '.licenserc.yaml'
- '**/*.md'
- 'LICENSE'
- 'NOTICE'
- '**/*.json'
- '**/*.log'

comment: on-failure
comment: never
1 change: 1 addition & 0 deletions src/substrait/proto/update_proto_package.pl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/perl -w
# SPDX-License-Identifier: Apache-2.0

# Renames package declarations for protobuffers from substrait to substrait.proto.
# This allows us to modify where the generated C++ have their definitions without
Expand Down
1 change: 1 addition & 0 deletions src/substrait/textplan/SymbolTable.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* SPDX-License-Identifier: Apache-2.0 */
#include <any>
#include <map>
#include <string>
Expand Down

0 comments on commit c70082d

Please sign in to comment.