From cd4624162e3d0eb23515a1b6e5eca990784155dd Mon Sep 17 00:00:00 2001 From: Yana Kalsina Date: Tue, 16 Dec 2025 20:49:47 +0300 Subject: [PATCH 1/2] Add 1st hw and created cmake for it --- CMakeLists.txt | 1 + src/HelloWorldDir/CMakeLists.txt | 1 + src/HelloWorldDir/helloWorld.c | 7 +++++++ 3 files changed, 9 insertions(+) create mode 100644 src/HelloWorldDir/CMakeLists.txt create mode 100644 src/HelloWorldDir/helloWorld.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b068e4..d00ba3d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.25) project(C_Homework C) add_subdirectory(src/CheckHowLintersWork) +add_subdirectory(src/HelloWorldDir) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/src/HelloWorldDir/CMakeLists.txt b/src/HelloWorldDir/CMakeLists.txt new file mode 100644 index 0000000..d2991c1 --- /dev/null +++ b/src/HelloWorldDir/CMakeLists.txt @@ -0,0 +1 @@ +add_executable(helloWorld helloWorld.c) \ No newline at end of file diff --git a/src/HelloWorldDir/helloWorld.c b/src/HelloWorldDir/helloWorld.c new file mode 100644 index 0000000..d1f4af6 --- /dev/null +++ b/src/HelloWorldDir/helloWorld.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("Hello, world!\n"); + return 0; +} \ No newline at end of file From dcafbc62efc1b286f4bc62bfeb422b6abf32d187 Mon Sep 17 00:00:00 2001 From: Yana Kalsina Date: Tue, 16 Dec 2025 21:00:51 +0300 Subject: [PATCH 2/2] Removed clang-tidy --- .github/workflows/build-and-lint.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/build-and-lint.yml b/.github/workflows/build-and-lint.yml index 3bb3a8a..fed17b5 100644 --- a/.github/workflows/build-and-lint.yml +++ b/.github/workflows/build-and-lint.yml @@ -10,13 +10,3 @@ jobs: - name: Check format run: | find . -path ./build -prune -o -type f -name '*.[c|h]' -print | xargs clang-format-18 --style=file --dry-run -Werror - - name: Configure - run: | - # -DCMAKE_EXPORT_COMPILE_COMMANDS=ON is important for clang-tidy - cmake . -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - - name: Build - run: | - cmake --build build - - name: Lint - run: | - run-clang-tidy-18 -p=build \ No newline at end of file