Skip to content

Commit 7d660bf

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c174c2e commit 7d660bf

54 files changed

Lines changed: 1420 additions & 1422 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.augment/rules/build-all.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ Build the complete project from scratch and systematically fix all encountered i
2323

2424
8. **Testing**: If applicable, run any existing tests to verify the build produces a functional application
2525

26-
Please provide detailed feedback on each issue encountered and the steps taken to resolve it, so I can track progress and understand the solutions implemented.
26+
Please provide detailed feedback on each issue encountered and the steps taken to resolve it, so I can track progress and understand the solutions implemented.

.augment/rules/build-examples-fix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Build all examples in the project completely and fix any issues encountered duri
1414
Please provide a summary of:
1515
- Which examples were built
1616
- What issues were encountered and how they were resolved
17-
- Verification that all functionality is working properly
17+
- Verification that all functionality is working properly

WARP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ atom/<module>/
2323
The build system enforces a strict dependency hierarchy defined in `cmake/module_dependencies.cmake`:
2424

2525
- **Foundation**: `atom-error` (base, no dependencies)
26-
- **Core**: `atom-log``atom-meta`/`atom-utils`
26+
- **Core**: `atom-log``atom-meta`/`atom-utils`
2727
- **Specialized**: `atom-web`, `atom-async`, `atom-system`, etc.
2828

2929
Build order: `atom-error``atom-log``atom-meta`/`atom-utils` → specialized modules
@@ -158,7 +158,7 @@ Use `atom-log` structured logging instead of `std::cout`
158158
159159
### Naming Conventions (per STYLE_OF_CODE.md)
160160
- **Variables/Functions**: camelCase
161-
- **Classes/Namespaces**: PascalCase
161+
- **Classes/Namespaces**: PascalCase
162162
- **Constants**: UPPER_SNAKE_CASE
163163
- **Files**: lower_snake_case.[cpp|hpp]
164164
- **Class members**: m_prefix for private variables

atom/meta/awaitable.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@ template <typename F, typename... Args>
1818
class SimpleAwaitable {
1919
public:
2020
using result_type = std::invoke_result_t<F, Args...>;
21-
21+
2222
SimpleAwaitable(F&& func, Args&&... args)
2323
: func_(std::forward<F>(func)), args_(std::forward<Args>(args)...) {}
24-
24+
2525
bool await_ready() const noexcept { return false; }
26-
26+
2727
void await_suspend(std::coroutine_handle<> handle) const noexcept {
2828
// For this simple implementation, we just resume immediately
2929
handle.resume();
3030
}
31-
31+
3232
result_type await_resume() {
3333
return std::apply(func_, args_);
3434
}
35-
35+
3636
private:
3737
F func_;
3838
std::tuple<Args...> args_;

cmake/FindDependencies.cmake

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function(atom_find_dependency dep_name)
2222

2323
string(TOUPPER ${dep_name} DEP_UPPER)
2424
set(found_var "${DEP_UPPER}_FOUND")
25-
25+
2626
# Skip if already found
2727
if(${found_var})
2828
return()
@@ -57,9 +57,9 @@ function(atom_find_dependency dep_name)
5757

5858
# Method 3: Manual search for header-only libraries
5959
if(NOT ${found_var} AND AFD_PATHS)
60-
find_path(${DEP_UPPER}_INCLUDE_DIR
60+
find_path(${DEP_UPPER}_INCLUDE_DIR
6161
NAMES ${AFD_PATHS}
62-
PATHS
62+
PATHS
6363
/usr/include
6464
/usr/local/include
6565
/mingw64/include
@@ -95,26 +95,26 @@ endfunction()
9595
# Function to setup a dependency target
9696
function(atom_setup_dependency_target dep_name target_name)
9797
string(TOUPPER ${dep_name} DEP_UPPER)
98-
98+
9999
if(NOT TARGET ${target_name})
100100
# Create imported target if it doesn't exist
101101
if(${DEP_UPPER}_FOUND)
102102
add_library(${target_name} INTERFACE IMPORTED)
103-
103+
104104
# Set include directories
105105
if(${DEP_UPPER}_INCLUDE_DIRS)
106106
target_include_directories(${target_name} INTERFACE ${${DEP_UPPER}_INCLUDE_DIRS})
107107
elseif(${DEP_UPPER}_INCLUDE_DIR)
108108
target_include_directories(${target_name} INTERFACE ${${DEP_UPPER}_INCLUDE_DIR})
109109
endif()
110-
110+
111111
# Set libraries
112112
if(${DEP_UPPER}_LIBRARIES)
113113
target_link_libraries(${target_name} INTERFACE ${${DEP_UPPER}_LIBRARIES})
114114
elseif(${dep_name}_LIBRARIES)
115115
target_link_libraries(${target_name} INTERFACE ${${dep_name}_LIBRARIES})
116116
endif()
117-
117+
118118
# Set compile flags
119119
if(${DEP_UPPER}_CFLAGS_OTHER)
120120
target_compile_options(${target_name} INTERFACE ${${DEP_UPPER}_CFLAGS_OTHER})
@@ -130,7 +130,7 @@ endfunction()
130130
# OpenSSL - Always required
131131
atom_find_dependency(OpenSSL REQUIRED)
132132

133-
# ZLIB - Always required
133+
# ZLIB - Always required
134134
atom_find_dependency(ZLIB REQUIRED)
135135

136136
# SQLite3 - Core database functionality
@@ -184,19 +184,19 @@ endif()
184184

185185
if(ATOM_USE_BOOST)
186186
set(BOOST_COMPONENTS)
187-
187+
188188
if(ATOM_USE_BOOST_LOCKFREE)
189189
list(APPEND BOOST_COMPONENTS atomic thread)
190190
endif()
191-
191+
192192
if(ATOM_USE_BOOST_GRAPH)
193193
list(APPEND BOOST_COMPONENTS graph)
194194
endif()
195-
195+
196196
if(ATOM_USE_BOOST_CONTAINER)
197197
list(APPEND BOOST_COMPONENTS container)
198198
endif()
199-
199+
200200
if(BOOST_COMPONENTS)
201201
atom_find_dependency(Boost QUIET VERSION 1.74 COMPONENTS ${BOOST_COMPONENTS})
202202
else()

cmake/ModuleDependencies.cmake

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function(atom_setup_module_dependencies module_name)
99
cmake_parse_arguments(AMD "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
1010

1111
string(TOUPPER ${module_name} MODULE_UPPER)
12-
12+
1313
# Link required dependencies
1414
foreach(dep ${AMD_REQUIRED_DEPS})
1515
if(TARGET ${dep})
@@ -18,7 +18,7 @@ function(atom_setup_module_dependencies module_name)
1818
message(WARNING "Required dependency ${dep} not found for module ${module_name}")
1919
endif()
2020
endforeach()
21-
21+
2222
# Link optional dependencies
2323
foreach(dep ${AMD_OPTIONAL_DEPS})
2424
if(TARGET ${dep})
@@ -28,7 +28,7 @@ function(atom_setup_module_dependencies module_name)
2828
message(STATUS "Optional dependency ${dep} not available for ${module_name}")
2929
endif()
3030
endforeach()
31-
31+
3232
# Link system libraries
3333
foreach(lib ${AMD_SYSTEM_LIBS})
3434
target_link_libraries(${module_name} PUBLIC ${lib})
@@ -41,11 +41,11 @@ function(atom_setup_standard_dependencies module_name)
4141
if(TARGET atom-error)
4242
target_link_libraries(${module_name} PUBLIC atom-error)
4343
endif()
44-
44+
4545
# Most modules need threading
4646
find_package(Threads REQUIRED)
4747
target_link_libraries(${module_name} PUBLIC Threads::Threads)
48-
48+
4949
# Platform-specific libraries
5050
if(WIN32)
5151
# Windows-specific libraries that many modules need
@@ -67,15 +67,15 @@ endfunction()
6767
# Function to setup logging dependencies
6868
function(atom_setup_logging_deps module_name)
6969
# Try to find loguru
70-
find_library(LOGURU_LIBRARY
70+
find_library(LOGURU_LIBRARY
7171
NAMES loguru
72-
PATHS
72+
PATHS
7373
/usr/lib
7474
/usr/local/lib
7575
/mingw64/lib
7676
${CMAKE_PREFIX_PATH}/lib
7777
)
78-
78+
7979
if(LOGURU_LIBRARY)
8080
target_link_libraries(${module_name} PUBLIC ${LOGURU_LIBRARY})
8181
message(STATUS "Loguru linked to ${module_name}")
@@ -96,7 +96,7 @@ function(atom_setup_xml_deps module_name)
9696
return()
9797
endif()
9898
endif()
99-
99+
100100
# Fallback to find_package
101101
find_package(tinyxml2 QUIET)
102102
if(tinyxml2_FOUND)
@@ -112,7 +112,7 @@ function(atom_setup_compression_deps module_name)
112112
if(ZLIB_FOUND)
113113
target_link_libraries(${module_name} PUBLIC ZLIB::ZLIB)
114114
endif()
115-
115+
116116
# Try to find additional compression libraries
117117
find_package(PkgConfig QUIET)
118118
if(PkgConfig_FOUND)
@@ -142,12 +142,12 @@ function(atom_setup_networking_deps module_name)
142142
target_compile_definitions(${module_name} PRIVATE ASIO_STANDALONE)
143143
message(STATUS "Asio linked to ${module_name}")
144144
endif()
145-
145+
146146
if(OpenSSL_FOUND)
147147
target_link_libraries(${module_name} PUBLIC OpenSSL::SSL OpenSSL::Crypto)
148148
message(STATUS "OpenSSL linked to ${module_name}")
149149
endif()
150-
150+
151151
# Platform-specific networking libraries
152152
if(WIN32)
153153
target_link_libraries(${module_name} PUBLIC ws2_32 wsock32 iphlpapi)
@@ -194,20 +194,20 @@ endfunction()
194194
# Macro to simplify common module setup
195195
macro(atom_configure_module module_name)
196196
atom_setup_standard_dependencies(${module_name})
197-
197+
198198
# Set common compile features
199199
target_compile_features(${module_name} PUBLIC cxx_std_20)
200-
200+
201201
# Set common compile options
202202
if(MSVC)
203203
target_compile_options(${module_name} PRIVATE /W4)
204204
else()
205205
target_compile_options(${module_name} PRIVATE -Wall -Wextra -Wpedantic)
206206
endif()
207-
207+
208208
# Set common include directories
209-
target_include_directories(${module_name}
210-
PUBLIC
209+
target_include_directories(${module_name}
210+
PUBLIC
211211
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
212212
$<INSTALL_INTERFACE:include>
213213
)

docs/ARCHITECTURAL_IMPROVEMENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ atom_setup_networking_deps(${module_name})
179179

180180
### Core Dependencies ✅
181181
- **OpenSSL**: Cryptographic operations - Working
182-
- **ZLIB**: Compression - Working
182+
- **ZLIB**: Compression - Working
183183
- **SQLite3**: Database operations - Working
184184
- **fmt**: String formatting - Working
185185
- **Asio**: Networking (standalone) - Working

docs/ARCHITECTURE_ANALYSIS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ atom-system (system operations)
9494

9595
#### Missing Example Files
9696
- **Issue**: Multiple example files referenced but not present
97-
- **Locations**:
97+
- **Locations**:
9898
- `example/image/io/` (4 missing files)
9999
- `example/image/processing/` (4 missing files)
100100
- `example/image/formats/` (5 missing files)
@@ -132,7 +132,7 @@ atom-system (system operations)
132132

133133
#### Inconsistent Package Finding
134134
- **Issue**: Different modules use different approaches for finding dependencies
135-
- **Examples**:
135+
- **Examples**:
136136
- Some use `find_package()`
137137
- Others use `pkg_check_modules()`
138138
- Inconsistent error handling

example/components/type_conversion_example.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ class TypeConverter {
3232
static TypeConverter instance;
3333
return instance;
3434
}
35-
35+
3636
struct Statistics {
3737
uint64_t totalConversions = 0;
3838
uint64_t successfulConversions = 0;
3939
uint64_t failedConversions = 0;
4040
uint64_t registeredConverters = 0;
4141
};
42-
42+
4343
Statistics getStatistics() const {
4444
return Statistics{};
4545
}
@@ -68,14 +68,14 @@ struct PlayerData {
6868
return id == other.id && name == other.name && score == other.score &&
6969
active == other.active;
7070
}
71-
71+
7272
bool operator<(const PlayerData& other) const {
7373
if (id != other.id) return id < other.id;
7474
if (name != other.name) return name < other.name;
7575
if (score != other.score) return score < other.score;
7676
return active < other.active;
7777
}
78-
78+
7979
bool operator>(const PlayerData& other) const {
8080
return other < *this;
8181
}
@@ -103,12 +103,12 @@ class Point2D {
103103
return std::abs(x_ - other.x_) < epsilon &&
104104
std::abs(y_ - other.y_) < epsilon;
105105
}
106-
106+
107107
bool operator<(const Point2D& other) const {
108108
if (x_ != other.x_) return x_ < other.x_;
109109
return y_ < other.y_;
110110
}
111-
111+
112112
bool operator>(const Point2D& other) const {
113113
return other < *this;
114114
}
@@ -135,18 +135,18 @@ int main() {
135135
try {
136136
// Create a simple component to demonstrate basic functionality
137137
auto component = std::make_shared<TypeConversionComponent>("TypeConversionDemo");
138-
138+
139139
std::cout << "\n1. Component created successfully" << std::endl;
140140
std::cout << "2. TypeConverter stub is functional" << std::endl;
141141
std::cout << "3. Custom types have comparison operators" << std::endl;
142-
142+
143143
// Test basic functionality
144144
PlayerData player(1, "TestPlayer", 100.0, true);
145145
Point2D point(3.14, 2.71);
146-
146+
147147
std::cout << "4. PlayerData: " << player.toString() << std::endl;
148148
std::cout << "5. Point2D: " << point.toString() << std::endl;
149-
149+
150150
// Test TypeConverter stub
151151
auto& converter = TypeConverter::instance();
152152
auto stats = converter.getStatistics();

example/extra/asio/mqtt_client.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class Client {
7979
void async_connect(const std::string& host, uint16_t port, const ConnectionOptions& options) {
8080
std::cout << "Connecting to " << host << ":" << port << " (stub)" << std::endl;
8181
std::cout << " Client ID: " << options.client_id << std::endl;
82-
82+
8383
// Simulate connection
8484
std::thread([this]() {
8585
std::this_thread::sleep_for(100ms);
@@ -91,7 +91,7 @@ class Client {
9191

9292
void async_subscribe(const std::string& topic, QoS qos) {
9393
std::cout << "Subscribing to topic: " << topic << " with QoS " << static_cast<int>(qos) << " (stub)" << std::endl;
94-
94+
9595
// Simulate receiving messages
9696
std::thread([this, topic]() {
9797
std::this_thread::sleep_for(200ms);

0 commit comments

Comments
 (0)