forked from AllStarLink/app_rpt
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.38 KB
/
Copy pathpre-commit.yml
File metadata and controls
45 lines (42 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: "Pre-commit checks"
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: write
actions: write
pull-requests: write
jobs:
codespell:
name: "Check for spelling errors"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: codespell-project/actions-codespell@v2
with:
check_filenames: true
ignore_words_file: ./.dev/.codespellignore
# When using this Action in other repos, the --skip option below can be removed
# and the .codespellignore file can be used to ignore files or words.
lint:
name: "C-lint tools"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cpp-linter/cpp-linter-action@v2
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
version: '19'
lines-changed-only: true
format-review: true
style: 'file:./.dev/.clang-format' # Use .clang-format config file
tidy-checks: '-*' # Use .clang-tidy config file
# only 'update' a single comment in a pull request thread.
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: exit 1