forked from MiroMindAI/MiroThinker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
36 lines (29 loc) · 885 Bytes
/
justfile
File metadata and controls
36 lines (29 loc) · 885 Bytes
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
default:
just --list
# lint monorepo
[group('precommit')]
lint:
uv tool run ruff@0.8.0 check --fix .
# sort imports
[group('precommit')]
sort-imports:
uv tool run ruff@0.8.0 check --select I --fix .
# format monorepo
[group('precommit')]
format:
uv tool run ruff@0.8.0 format .
# check license
[group('precommit')]
check-license:
uv run reuse lint
# insert license for contributor
insert-license:
# https://reuse.readthedocs.io/en/stable/scripts.html#add-headers-to-staged-files-based-on-git-settings
git diff --name-only --cached | xargs -I {} reuse annotate -c "$(git config --get user.name) <$(git config --get user.email)>" "{}"
# format markdown files
[group('precommit')]
format-md:
find . -name "*.md" -type f | xargs uv tool run mdformat@0.7.17
# run precommit before PR
[group('precommit')]
precommit: lint sort-imports format-md format