Skip to content

Commit 531cb78

Browse files
committed
lint fix
1 parent 2780b90 commit 531cb78

File tree

5 files changed

+24
-8
lines changed

5 files changed

+24
-8
lines changed

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS
1212
)
1313

1414
find_package(Catch2 3.8.0 REQUIRED)
15-
if (Catch2_FOUND)
15+
if(Catch2_FOUND)
1616
message(STATUS "Found Catch2 ${Catch2_VERSION}.")
1717
else()
1818
message(FATAL_ERROR "Could not find libraries for Catch2.")
@@ -26,5 +26,10 @@ add_subdirectory(src/ystdlib)
2626

2727
add_executable(unitTest)
2828
target_sources(unitTest PRIVATE src/main.cpp)
29-
target_link_libraries(unitTest PRIVATE ystdlib::testlib Catch2::Catch2WithMain)
29+
target_link_libraries(
30+
unitTest
31+
PRIVATE
32+
ystdlib::testlib
33+
Catch2::Catch2WithMain
34+
)
3035
target_compile_features(unitTest PRIVATE cxx_std_20)

src/main.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#define CATCH_CONFIG_MAIN
22

3+
#include <catch2/catch_test_macros.hpp>
34
#include <concepts>
4-
#include <iostream>
5-
6-
#include <catch2/catch_all.hpp>
75
#include <ystdlib/testlib/hello.hpp>
86

97
namespace {
@@ -15,5 +13,5 @@ requires std::integral<T>
1513
}; // namespace
1614

1715
TEST_CASE("dummy") {
18-
REQUIRE((169 == square(ystdlib::testlib::hello().size())));
16+
REQUIRE((169 == square(ystdlib::testlib::hello().size())));
1917
}

taskfiles/build.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,22 @@ tasks:
1414

1515
clean:
1616
desc: "Removes all built artifacts."
17+
deps:
18+
- ":config-cmake-project"
1719
cmds:
1820
- >-
1921
cmake
2022
--build "{{.G_BUILD_DIR}}"
2123
--parallel {{numCPU}}
2224
--target clean
25+
26+
config-cmake-project:
27+
internal: true
28+
sources:
29+
- "CMakeLists.txt"
30+
- "{{.TASKFILE}}"
31+
generates:
32+
- "{{.G_CMAKE_CACHE}}"
33+
- "{{.G_COMPILE_COMMANDS_DB}}"
34+
cmds:
35+
- "cmake -S '{{.ROOT_DIR}}' -B '{{.G_BUILD_DIR}}'"

taskfiles/deps.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ vars:
77
"Catch2": "v3.8.0"
88
}
99
G_DEPS_RELEASES:
10-
ref: 'fromJson .G_DEPS_RELEASES_JSON'
10+
ref: "fromJson .G_DEPS_RELEASES_JSON"
1111

1212
tasks:
1313
install-all:

taskfiles/lint-cpp.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ tasks:
6565
- "{{.ROOT_DIR}}/.clang-tidy"
6666
- "{{.TASKFILE}}"
6767
deps:
68-
- ":config-cmake-project"
68+
- ":build:config-cmake-project"
6969
- "cpp-configs"
7070
- "venv"
7171
cmds:

0 commit comments

Comments
 (0)