Skip to content

Commit d124e5c

Browse files
committed
ci: migrate linting to mise tool
- Move workflow permissions to top-level for better clarity - Replace custom lint.sh script with mise lint command
1 parent 6be67e4 commit d124e5c

File tree

4 files changed

+18
-19
lines changed

4 files changed

+18
-19
lines changed

.github/workflows/lint.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,18 @@ on:
44
push:
55
pull_request:
66
workflow_dispatch:
7+
permissions:
8+
contents: read
79

810
jobs:
911
lint:
1012
runs-on: ubuntu-latest
1113

12-
# Grant minimal read-only access to repository contents
13-
permissions:
14-
contents: read
15-
1614
steps:
17-
- name: Checkout
18-
uses: actions/checkout@v6
19-
20-
- name: Setup Python
21-
uses: actions/setup-python@v5
22-
with:
23-
python-version: '3.12'
15+
- uses: actions/checkout@v6
2416

25-
- name: Install Dependencies
26-
run: pip install cpplint
17+
- name: Install mise
18+
uses: jdx/mise-action@v3
2719

28-
- name: Run Linters
29-
run: ./lint.sh
20+
- name: Run linters
21+
run: mise run lint

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pip install cpplint
7171
**Run linting:**
7272

7373
```sh
74-
./lint.sh
74+
mise lint
7575
```
7676

7777
### Contributing

lint.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

mise.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[tools]
2+
python = "3.12"
3+
4+
[tasks.lint]
5+
description = "Run linters"
6+
run = [
7+
"python -m pip install --upgrade pip",
8+
"pip install cpplint",
9+
"cpplint --recursive ."
10+
]

0 commit comments

Comments
 (0)