forked from FastLED/FastLED
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lint
executable file
·35 lines (29 loc) · 783 Bytes
/
lint
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
#!/bin/bash
set -e
cd "$(dirname "$0")"
# if .venv not found
if [ ! -d .venv ]; then
# create virtual environment
./install
fi
# Linting the python code.
echo "Running ruff check"
uv run ruff check --fix ci --exclude ci/tmp/
echo Running black
black ci --exclude ci/tmp/
echo Running isort
isort --profile black ci --skip ci/tmp/
echo "Running mypy"
uv run mypy ci --exclude ci/tmp/
# Linting the C++ code.
folders=(
#"src/lib8tion"
#"src/platforms/stub"
#"src/platforms/apollo3" # clang-format breaks apollo3
#"src/platforms/esp/8266" # clang-format breaks esp8266
#"src/platforms/arm" # clang-format breaks arm
)
for folder in "${folders[@]}"; do
echo "Running clang-format on $folder"
uv run ci/run-clang-format.py -i -r "$folder"
done