-
Notifications
You must be signed in to change notification settings - Fork 119
58 lines (54 loc) · 2.1 KB
/
validate-cpp.yml
File metadata and controls
58 lines (54 loc) · 2.1 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
46
47
48
49
50
51
52
53
54
55
56
57
58
name: 'Validate C++'
on:
push:
branches:
- main
paths:
- '.github/workflows/validate-cpp.yml'
- 'packages/react-native-quick-crypto/android/src/main/cpp/**'
- 'packages/react-native-quick-crypto/cpp/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/shared/**'
pull_request:
paths:
- '.github/workflows/validate-cpp.yml'
- 'packages/react-native-quick-crypto/android/src/main/cpp/**'
- 'packages/react-native-quick-crypto/cpp/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/shared/**'
env:
# Opt actions still on Node 20 (e.g. reviewdog/action-cpplint) into the runner's Node 24.
# Silences deprecation warnings until each action ships a v5.
# https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true'
# Minimum scopes — reviewdog posts review comments on PRs.
permissions:
contents: read
checks: write
pull-requests: write
jobs:
validate_cpp:
name: C++ Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Set up clang-format
run: sudo apt-get install -y clang-format
- name: Run clang-format check
run: |
find packages/react-native-quick-crypto/cpp packages/react-native-quick-crypto/android/src/main/cpp \
-regex '.*\.\(cpp\|hpp\|cc\|cxx\|h\)' \
-exec clang-format --style=file --dry-run --Werror {} +
- uses: reviewdog/action-cpplint@9552c62f4bd516c1e3a6f84eae56bd864cc304c6 # v1.11.0
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
flags: --linelength=140
targets: --recursive packages/react-native-quick-crypto/cpp packages/react-native-quick-crypto/android/src/main/cpp
filter: "-legal/copyright\
,-readability/todo\
,-build/namespaces\
,-whitespace/comments\
,-build/include_order\
,-whitespace/indent_namespace\
,-whitespace/parens\
,-build/include_what_you_use\
"