5 Commits

Author SHA1 Message Date
c2a3e8417a easier linter 2024-08-29 14:35:33 +02:00
92098b6ba1 linter
add main to exclude
2023-12-23 23:43:43 +01:00
9e7668727e build env 2023-12-23 23:39:13 +01:00
30cda25039 build scripts 2023-12-23 23:38:43 +01:00
f65f70d5c3 linter 2023-12-23 22:49:28 +01:00
6 changed files with 53 additions and 0 deletions

11
.lint/exclude Normal file
View File

@@ -0,0 +1,11 @@
project/Core/Inc/main.h
project/Core/Inc/stm32f7xx_hal_conf.h
project/Core/Inc/stm32f7xx_it.h
project/Core/Inc/fsdata_custom.c
project/Core/Src/main.c
project/Core/Src/stm32f7xx_hal_msp.c
project/Core/Src/syscalls.c
project/Core/Src/sysmem.c
project/Core/Src/system_stm32f7xx.c
project/Core/Src/stm32f7xx_it.c
mkllfs/build/CMakeFiles/3.27.7/CompilerIdC/CMakeCCompilerId.c

4
.lint/search Normal file
View File

@@ -0,0 +1,4 @@
project/Core/
mkllfs
tests/
Applications/Qt-application_for_UDP_broadcast/

8
build_app.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
cd project/
rm -fr build/*
cmake -B build/ -G Ninja
ninja -C build/
cd ../

7
build_tests.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/bash
rm -fr build/*
cmake -B build/ -G Ninja
ninja -C build/
ctest --test-dir build

View File

@@ -0,0 +1,8 @@
FROM fedora:39
RUN dnf update -y
RUN dnf install -y git
RUN dnf install -y ninja-build make cmake gcc-c++ gcc clang-tools-extra clang-devel clang
RUN dnf install -y gtest-devel gtest
RUN dnf install -y arm-none-eabi-gcc-cs arm-none-eabi-gcc-cs-c++ arm-none-eabi-binutils-cs.x86_64 arm-none-eabi-newlib.noarch
ENTRYPOINT [ "/bin/bash" ]

15
lint.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
if (( $# < 1 )); then
>&2 echo "Illegal number of parameters"
exit 1
fi
# save unsaved work
git stash --include-untracked
clang-format -i "$@"
git add -A && git commit -m "Lint"
git stash pop