Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/lint-clang.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Lint Clang

on:
push:
branches:
- main
pull_request:
branches:
- main
merge_group:
types:
- checks_requested

jobs:
lint:
if: false # temporarily disable clang linting
name: Run clang lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4


- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run clang lint
run: yarn lint-clang
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@
"test": "jest --passWithNoTests",
"typecheck": "tsc",
"lint": "eslint \"**/*.{js,ts,tsx}\"",
"lint-clang:ios": "find ios/ \\( -iname \"*.h\" -o -iname \"*.m\" -o -iname \"*.mm\" \\) | grep -v -e Pods -e build | xargs clang-format -i -n --Werror",
"lint-clang:ios:fix": "find ios/ \\( -iname \"*.h\" -o -iname \"*.m\" -o -iname \"*.mm\" \\) | grep -v -e Pods -e build | xargs clang-format -i",
"lint-clang:android": "find android/ \\( -iname \"*.h\" -o -iname \"*.cpp\" \\) | grep -v -e build | xargs clang-format -i -n --Werror",
"lint-clang:android:fix": "find android/ \\( -iname \"*.h\" -o -iname \"*.cpp\" \\) | grep -v -e build | xargs clang-format -i",
"lint-clang": "yarn lint-clang:ios && yarn lint-clang:android",
"lint-clang:fix": "yarn lint-clang:ios:fix && yarn lint-clang:android:fix",
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
"prepare": "bob build",
"release": "release-it",
Expand Down
Loading