| Files | Last commit | Last update |
|---|---|---|
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(cxx): move long helper bodies out of headers What: The bodies of FromYaml (topic CLI), the gRPC status mapping, the gRPC receive dump formatter, the ROS 2 name encoder/decoder and the Zenoh payload decoder move from their headers into new .cpp files of the same target; the headers keep the declarations and default arguments. The test executables that compile these sources directly (Zenoh discovery test, ibmw_diag topic test) list the new files. The unused ros2_qos_profiles.h in the DDS extension, which no file includes, is removed. Why: Long inline functions in headers are compiled into every includer and make the headers harder to read; these helpers are not templates and not on a hot path, so a normal out-of-line definition is enough. Verification: build-ci make -j24 -k without errors; ctest 75/75. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(format): switch C and C++ sources to the OpenHarmony code style What: - Replace .clang-format with the OpenHarmony style required by the daily code check: 4-space indent, 120 columns, function left brace on its own line, braces on every if/for/while body, case labels indented. - Run clang-format 18 over all hand-written C and C++ files; the files generated by ibmw_gen (the kept *_gen samples and the template project) are left for the generator change that follows, except the headers the generator copies verbatim from the reformatted sources. - plain_dds_pubsub_type.h: the Fast DDS version #if now only switches the function signature, so both branches share one body brace; clang-format could not indent the old form. - Tests that search source text for a fixed indentation now use the new indentation or ignore it. Why: About 32 000 of the reported findings are layout rules (indentation, brace position, line width) that clang-format handles mechanically. This commit only changes whitespace, adds braces, splits long string literals and sorts using-declarations; a check of every file confirmed no other tokens changed and every #if branch keeps its brace balance. Verification: - Full build with -Werror: no errors; ctest: 75 of 75 passed - pytest src/tools/ibmw_gen/tests: 332 passed, 1 known failure (needs IBMW_BUILD_DIR) - scripts/tests: same results as before the change - scripts/check_clang_format.sh and its tests pass Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): give file-scope globals the g_ camelBack names What: - The DDS communication trace source and its test, the bag command, the topic command stop flag (command_lifecycle.h and its users) and the managed exact candidate now name their mutable file-scope variables with the g_ prefix and camelBack, for example g_slots, g_binding, g_exactEnabled and g_stopRequested. - Two output statements in the DDS trace source are split so no line starts with "<<", and the exact-mode switch is computed from three named conditions before it is stored. The stored value is the same. Why: The code checker asks for one naming style for global variables. Only names and statement layout change; behaviour stays the same. command_lifecycle.h is not installed, so no public header changes. Verification: build-ci incremental build without errors, ctest 74/75: the bounded queue timing test BoundedBlockingQueueTest.StarvedSpinnerDoesNotStallSteadyPushes failed, and also failed in 2 of 3 runs alone. Its sources and test binary are not changed by this work; the cause was not investigated. Build and ctest were run on the final tree, not on each commit. Other checks: the trace source, its test and the candidate syntax-checked with communication trace on, clang-format clean, clang-tidy naming check finds no global variable names left (the candidate scan is partial: clang rejects a generated header). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(format): switch C and C++ sources to the OpenHarmony code style What: - Replace .clang-format with the OpenHarmony style required by the daily code check: 4-space indent, 120 columns, function left brace on its own line, braces on every if/for/while body, case labels indented. - Run clang-format 18 over all hand-written C and C++ files; the files generated by ibmw_gen (the kept *_gen samples and the template project) are left for the generator change that follows, except the headers the generator copies verbatim from the reformatted sources. - plain_dds_pubsub_type.h: the Fast DDS version #if now only switches the function signature, so both branches share one body brace; clang-format could not indent the old form. - Tests that search source text for a fixed indentation now use the new indentation or ignore it. Why: About 32 000 of the reported findings are layout rules (indentation, brace position, line width) that clang-format handles mechanically. This commit only changes whitespace, adds braces, splits long string literals and sorts using-declarations; a check of every file confirmed no other tokens changed and every #if branch keeps its brace balance. Verification: - Full build with -Werror: no errors; ctest: 75 of 75 passed - pytest src/tools/ibmw_gen/tests: 332 passed, 1 known failure (needs IBMW_BUILD_DIR) - scripts/tests: same results as before the change - scripts/check_clang_format.sh and its tests pass Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(naming): use camelBack for parameters and local variables What: - Rename function parameters, local variables, local constants, static locals, structured bindings, lambda parameters, lambda init-captures and loop variables from snake_case (and UPPER_CASE local constants) to camelBack in the hand-written C/C++ sources, including function pointer parameter names in the C API structs. - Cover code clang-tidy cannot see: inactive #if branches (newer Fast DDS, OHOS, executor back-ends, test hook builds), files not in the CI build (ROS 2 samples, OHOS-only sources, extension tests, bench and selfdev tools) and locals declared inside function-like macros such as IBMW_PKG_MAIN and IBMW_USE_DRIVER(S). - Where a new name would clash with a name already in scope, pick a distinct name: the sample hello_msg.h constructor uses msgId/msg/ts, the shm transport driver's structured bindings are re-captured by name for the older OHOS clang, and one generic DDS type branch reuses the name the other branch already declares. - Update comments that name the parameters (/*name=*/ argument comments, @param, \p and inline prose). - Re-run clang-format on every changed file. - Members, types, enum values, globals, namespace constants, functions, macros, macro parameters and third-party code are unchanged. Why: the daily code check requires camelBack names for parameters and local variables. Verification: clang-tidy readability-identifier-naming for parameters and locals reports 0 findings in repo files; g++ -Wshadow over all build-ci sources shows no new warnings (two fewer); syntax checks of the core metrics/comm trace/test hook and fault/reporter build variants show no new errors; full build-ci build has no errors; ctest 75/75; mw_perf_collect pytest 968 passed, 2 skipped; core metrics pytest 215 passed; clang-format --dry-run -Werror clean on all C/C++ files; license header check 0 changes. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(cxx): list lambda captures explicitly What: - Every lambda that used a default capture ([&], or [&, x]) now names what it captures, across src, selfdev, tools, samples and the ibmw-template project. A former [&] lists each variable by reference (&name) plus this where members are used; explicit captures that were already there are kept unchanged, so what is captured and how is the same as before. - The capture lists were derived from the compiler: the default capture was removed and every "not captured" error added that name, until the translation unit compiled again. Lambdas the build does not compile (other feature flags, OHOS-only and Fast DDS 3 code, the IBMW_DRIVER_ENTRY macro) were done by hand. - The copied Fibonacci action client in the generated sample follows its source. Why: the code check forbids default lambda captures; naming the captures shows which locals a lambda (often running on another thread) keeps references to. Verification: build-ci full build without errors; ctest 75/75; files outside the build compiled with a synthetic command (with and without the core metrics, comm trace and reporter flags) without new errors; clang -Wunused-lambda-capture reports no unused capture; scripts/regen_in_tree.sh reproduces the generated samples; clang-format clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(naming): use camelBack for parameters and local variables What: - Rename function parameters, local variables, local constants, static locals, structured bindings, lambda parameters, lambda init-captures and loop variables from snake_case (and UPPER_CASE local constants) to camelBack in the hand-written C/C++ sources, including function pointer parameter names in the C API structs. - Cover code clang-tidy cannot see: inactive #if branches (newer Fast DDS, OHOS, executor back-ends, test hook builds), files not in the CI build (ROS 2 samples, OHOS-only sources, extension tests, bench and selfdev tools) and locals declared inside function-like macros such as IBMW_PKG_MAIN and IBMW_USE_DRIVER(S). - Where a new name would clash with a name already in scope, pick a distinct name: the sample hello_msg.h constructor uses msgId/msg/ts, the shm transport driver's structured bindings are re-captured by name for the older OHOS clang, and one generic DDS type branch reuses the name the other branch already declares. - Update comments that name the parameters (/*name=*/ argument comments, @param, \p and inline prose). - Re-run clang-format on every changed file. - Members, types, enum values, globals, namespace constants, functions, macros, macro parameters and third-party code are unchanged. Why: the daily code check requires camelBack names for parameters and local variables. Verification: clang-tidy readability-identifier-naming for parameters and locals reports 0 findings in repo files; g++ -Wshadow over all build-ci sources shows no new warnings (two fewer); syntax checks of the core metrics/comm trace/test hook and fault/reporter build variants show no new errors; full build-ci build has no errors; ctest 75/75; mw_perf_collect pytest 968 passed, 2 skipped; core metrics pytest 215 passed; clang-format --dry-run -Werror clean on all C/C++ files; license header check 0 changes. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(naming): use camelBack for parameters and local variables What: - Rename function parameters, local variables, local constants, static locals, structured bindings, lambda parameters, lambda init-captures and loop variables from snake_case (and UPPER_CASE local constants) to camelBack in the hand-written C/C++ sources, including function pointer parameter names in the C API structs. - Cover code clang-tidy cannot see: inactive #if branches (newer Fast DDS, OHOS, executor back-ends, test hook builds), files not in the CI build (ROS 2 samples, OHOS-only sources, extension tests, bench and selfdev tools) and locals declared inside function-like macros such as IBMW_PKG_MAIN and IBMW_USE_DRIVER(S). - Where a new name would clash with a name already in scope, pick a distinct name: the sample hello_msg.h constructor uses msgId/msg/ts, the shm transport driver's structured bindings are re-captured by name for the older OHOS clang, and one generic DDS type branch reuses the name the other branch already declares. - Update comments that name the parameters (/*name=*/ argument comments, @param, \p and inline prose). - Re-run clang-format on every changed file. - Members, types, enum values, globals, namespace constants, functions, macros, macro parameters and third-party code are unchanged. Why: the daily code check requires camelBack names for parameters and local variables. Verification: clang-tidy readability-identifier-naming for parameters and locals reports 0 findings in repo files; g++ -Wshadow over all build-ci sources shows no new warnings (two fewer); syntax checks of the core metrics/comm trace/test hook and fault/reporter build variants show no new errors; full build-ci build has no errors; ctest 75/75; mw_perf_collect pytest 968 passed, 2 skipped; core metrics pytest 215 passed; clang-format --dry-run -Werror clean on all C/C++ files; license header check 0 changes. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(format): switch C and C++ sources to the OpenHarmony code style What: - Replace .clang-format with the OpenHarmony style required by the daily code check: 4-space indent, 120 columns, function left brace on its own line, braces on every if/for/while body, case labels indented. - Run clang-format 18 over all hand-written C and C++ files; the files generated by ibmw_gen (the kept *_gen samples and the template project) are left for the generator change that follows, except the headers the generator copies verbatim from the reformatted sources. - plain_dds_pubsub_type.h: the Fast DDS version #if now only switches the function signature, so both branches share one body brace; clang-format could not indent the old form. - Tests that search source text for a fixed indentation now use the new indentation or ignore it. Why: About 32 000 of the reported findings are layout rules (indentation, brace position, line width) that clang-format handles mechanically. This commit only changes whitespace, adds braces, splits long string literals and sorts using-declarations; a check of every file confirmed no other tokens changed and every #if branch keeps its brace balance. Verification: - Full build with -Werror: no errors; ctest: 75 of 75 passed - pytest src/tools/ibmw_gen/tests: 332 passed, 1 known failure (needs IBMW_BUILD_DIR) - scripts/tests: same results as before the change - scripts/check_clang_format.sh and its tests pass Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(style): keep stream operators at the end of wrapped lines What: - Split long stream output chains into one statement per line, so no wrapped line starts with a "<<" operator. - In tests, move long conditions or lookups into named locals and build long failure messages as a string first, so each assertion fits on one line. - Applied the same change repo-wide (about 180 statements in 79 files): JSON and YAML builders, CLI output, diagnostics and tests. Why: - The code checker requires that a wrapped expression keeps its operator at the end of the line, not at the start of the next line. clang-format always breaks before "<<", so the only way to satisfy both tools is to keep each statement short enough to fit on one line. - The produced text is unchanged: every split statement writes the same pieces in the same order. Verification: - build-ci full rebuild: no errors; ctest 75/75 passed. - mw_perf_collect tests: 969 passed, 2 skipped; core metrics tests: 215 passed. - clang-format dry run, generated-code format check, function size check and license check: all clean; no code line starts with a binary operator. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(cli-topic): split topic commands into smaller functions What: Topic discovery options, echo, list, pub and observation code is split into helpers. The echo queue becomes a small class, the pub option parser configures each backend in its own function, and the pub option help list is a table in the same order. Messages, defaults, YAML configuration order and help text are unchanged. Why: The code check limits function length, nesting depth and cyclomatic complexity. Verification: build-ci builds; ibmw_topic_cli_test passes. clang-format clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(cli-topic): split topic commands into smaller functions What: Topic discovery options, echo, list, pub and observation code is split into helpers. The echo queue becomes a small class, the pub option parser configures each backend in its own function, and the pub option help list is a table in the same order. Messages, defaults, YAML configuration order and help text are unchanged. Why: The code check limits function length, nesting depth and cyclomatic complexity. Verification: build-ci builds; ibmw_topic_cli_test passes. clang-format clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(format): switch C and C++ sources to the OpenHarmony code style What: - Replace .clang-format with the OpenHarmony style required by the daily code check: 4-space indent, 120 columns, function left brace on its own line, braces on every if/for/while body, case labels indented. - Run clang-format 18 over all hand-written C and C++ files; the files generated by ibmw_gen (the kept *_gen samples and the template project) are left for the generator change that follows, except the headers the generator copies verbatim from the reformatted sources. - plain_dds_pubsub_type.h: the Fast DDS version #if now only switches the function signature, so both branches share one body brace; clang-format could not indent the old form. - Tests that search source text for a fixed indentation now use the new indentation or ignore it. Why: About 32 000 of the reported findings are layout rules (indentation, brace position, line width) that clang-format handles mechanically. This commit only changes whitespace, adds braces, splits long string literals and sorts using-declarations; a check of every file confirmed no other tokens changed and every #if branch keeps its brace balance. Verification: - Full build with -Werror: no errors; ctest: 75 of 75 passed - pytest src/tools/ibmw_gen/tests: 332 passed, 1 known failure (needs IBMW_BUILD_DIR) - scripts/tests: same results as before the change - scripts/check_clang_format.sh and its tests pass Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(format): switch C and C++ sources to the OpenHarmony code style What: - Replace .clang-format with the OpenHarmony style required by the daily code check: 4-space indent, 120 columns, function left brace on its own line, braces on every if/for/while body, case labels indented. - Run clang-format 18 over all hand-written C and C++ files; the files generated by ibmw_gen (the kept *_gen samples and the template project) are left for the generator change that follows, except the headers the generator copies verbatim from the reformatted sources. - plain_dds_pubsub_type.h: the Fast DDS version #if now only switches the function signature, so both branches share one body brace; clang-format could not indent the old form. - Tests that search source text for a fixed indentation now use the new indentation or ignore it. Why: About 32 000 of the reported findings are layout rules (indentation, brace position, line width) that clang-format handles mechanically. This commit only changes whitespace, adds braces, splits long string literals and sorts using-declarations; a check of every file confirmed no other tokens changed and every #if branch keeps its brace balance. Verification: - Full build with -Werror: no errors; ctest: 75 of 75 passed - pytest src/tools/ibmw_gen/tests: 332 passed, 1 known failure (needs IBMW_BUILD_DIR) - scripts/tests: same results as before the change - scripts/check_clang_format.sh and its tests pass Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(style): keep stream operators at the end of wrapped lines What: - Split long stream output chains into one statement per line, so no wrapped line starts with a "<<" operator. - In tests, move long conditions or lookups into named locals and build long failure messages as a string first, so each assertion fits on one line. - Applied the same change repo-wide (about 180 statements in 79 files): JSON and YAML builders, CLI output, diagnostics and tests. Why: - The code checker requires that a wrapped expression keeps its operator at the end of the line, not at the start of the next line. clang-format always breaks before "<<", so the only way to satisfy both tools is to keep each statement short enough to fit on one line. - The produced text is unchanged: every split statement writes the same pieces in the same order. Verification: - build-ci full rebuild: no errors; ctest 75/75 passed. - mw_perf_collect tests: 969 passed, 2 skipped; core metrics tests: 215 passed. - clang-format dry run, generated-code format check, function size check and license check: all clean; no code line starts with a binary operator. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(format): switch C and C++ sources to the OpenHarmony code style What: - Replace .clang-format with the OpenHarmony style required by the daily code check: 4-space indent, 120 columns, function left brace on its own line, braces on every if/for/while body, case labels indented. - Run clang-format 18 over all hand-written C and C++ files; the files generated by ibmw_gen (the kept *_gen samples and the template project) are left for the generator change that follows, except the headers the generator copies verbatim from the reformatted sources. - plain_dds_pubsub_type.h: the Fast DDS version #if now only switches the function signature, so both branches share one body brace; clang-format could not indent the old form. - Tests that search source text for a fixed indentation now use the new indentation or ignore it. Why: About 32 000 of the reported findings are layout rules (indentation, brace position, line width) that clang-format handles mechanically. This commit only changes whitespace, adds braces, splits long string literals and sorts using-declarations; a check of every file confirmed no other tokens changed and every #if branch keeps its brace balance. Verification: - Full build with -Werror: no errors; ctest: 75 of 75 passed - pytest src/tools/ibmw_gen/tests: 332 passed, 1 known failure (needs IBMW_BUILD_DIR) - scripts/tests: same results as before the change - scripts/check_clang_format.sh and its tests pass Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(cli-topic): split topic commands into smaller functions What: Topic discovery options, echo, list, pub and observation code is split into helpers. The echo queue becomes a small class, the pub option parser configures each backend in its own function, and the pub option help list is a table in the same order. Messages, defaults, YAML configuration order and help text are unchanged. Why: The code check limits function length, nesting depth and cyclomatic complexity. Verification: build-ci builds; ibmw_topic_cli_test passes. clang-format clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(format): switch C and C++ sources to the OpenHarmony code style What: - Replace .clang-format with the OpenHarmony style required by the daily code check: 4-space indent, 120 columns, function left brace on its own line, braces on every if/for/while body, case labels indented. - Run clang-format 18 over all hand-written C and C++ files; the files generated by ibmw_gen (the kept *_gen samples and the template project) are left for the generator change that follows, except the headers the generator copies verbatim from the reformatted sources. - plain_dds_pubsub_type.h: the Fast DDS version #if now only switches the function signature, so both branches share one body brace; clang-format could not indent the old form. - Tests that search source text for a fixed indentation now use the new indentation or ignore it. Why: About 32 000 of the reported findings are layout rules (indentation, brace position, line width) that clang-format handles mechanically. This commit only changes whitespace, adds braces, splits long string literals and sorts using-declarations; a check of every file confirmed no other tokens changed and every #if branch keeps its brace balance. Verification: - Full build with -Werror: no errors; ctest: 75 of 75 passed - pytest src/tools/ibmw_gen/tests: 332 passed, 1 known failure (needs IBMW_BUILD_DIR) - scripts/tests: same results as before the change - scripts/check_clang_format.sh and its tests pass Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(cli-topic): split topic commands into smaller functions What: Topic discovery options, echo, list, pub and observation code is split into helpers. The echo queue becomes a small class, the pub option parser configures each backend in its own function, and the pub option help list is a table in the same order. Messages, defaults, YAML configuration order and help text are unchanged. Why: The code check limits function length, nesting depth and cyclomatic complexity. Verification: build-ci builds; ibmw_topic_cli_test passes. clang-format clean. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(cxx): move long helper bodies out of headers What: The bodies of FromYaml (topic CLI), the gRPC status mapping, the gRPC receive dump formatter, the ROS 2 name encoder/decoder and the Zenoh payload decoder move from their headers into new .cpp files of the same target; the headers keep the declarations and default arguments. The test executables that compile these sources directly (Zenoh discovery test, ibmw_diag topic test) list the new files. The unused ros2_qos_profiles.h in the DDS extension, which no file includes, is removed. Why: Long inline functions in headers are compiled into every includer and make the headers harder to read; these helpers are not templates and not on a hot path, so a normal out-of-line definition is enough. Verification: build-ci make -j24 -k without errors; ctest 75/75. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): give file-scope globals the g_ camelBack names What: - The DDS communication trace source and its test, the bag command, the topic command stop flag (command_lifecycle.h and its users) and the managed exact candidate now name their mutable file-scope variables with the g_ prefix and camelBack, for example g_slots, g_binding, g_exactEnabled and g_stopRequested. - Two output statements in the DDS trace source are split so no line starts with "<<", and the exact-mode switch is computed from three named conditions before it is stored. The stored value is the same. Why: The code checker asks for one naming style for global variables. Only names and statement layout change; behaviour stays the same. command_lifecycle.h is not installed, so no public header changes. Verification: build-ci incremental build without errors, ctest 74/75: the bounded queue timing test BoundedBlockingQueueTest.StarvedSpinnerDoesNotStallSteadyPushes failed, and also failed in 2 of 3 runs alone. Its sources and test binary are not changed by this work; the cause was not investigated. Build and ctest were run on the final tree, not on each commit. Other checks: the trace source, its test and the candidate syntax-checked with communication trace on, clang-format clean, clang-tidy naming check finds no global variable names left (the candidate scan is partial: clang rejects a generated header). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(naming): use camelBack for parameters and local variables What: - Rename function parameters, local variables, local constants, static locals, structured bindings, lambda parameters, lambda init-captures and loop variables from snake_case (and UPPER_CASE local constants) to camelBack in the hand-written C/C++ sources, including function pointer parameter names in the C API structs. - Cover code clang-tidy cannot see: inactive #if branches (newer Fast DDS, OHOS, executor back-ends, test hook builds), files not in the CI build (ROS 2 samples, OHOS-only sources, extension tests, bench and selfdev tools) and locals declared inside function-like macros such as IBMW_PKG_MAIN and IBMW_USE_DRIVER(S). - Where a new name would clash with a name already in scope, pick a distinct name: the sample hello_msg.h constructor uses msgId/msg/ts, the shm transport driver's structured bindings are re-captured by name for the older OHOS clang, and one generic DDS type branch reuses the name the other branch already declares. - Update comments that name the parameters (/*name=*/ argument comments, @param, \p and inline prose). - Re-run clang-format on every changed file. - Members, types, enum values, globals, namespace constants, functions, macros, macro parameters and third-party code are unchanged. Why: the daily code check requires camelBack names for parameters and local variables. Verification: clang-tidy readability-identifier-naming for parameters and locals reports 0 findings in repo files; g++ -Wshadow over all build-ci sources shows no new warnings (two fewer); syntax checks of the core metrics/comm trace/test hook and fault/reporter build variants show no new errors; full build-ci build has no errors; ctest 75/75; mw_perf_collect pytest 968 passed, 2 skipped; core metrics pytest 215 passed; clang-format --dry-run -Werror clean on all C/C++ files; license header check 0 changes. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(style): keep every code block indented by multiples of four spaces What: - Lambdas whose bodies ended up at an odd column (a lambda passed inside an argument list or a braced initializer and aligned after the open bracket) are now named locals declared before the statement, or static member functions where the table is a member initializer (logger and executor tables, the iceoryx subscription teardown). - The bag option tables use small named setter functions for the four options whose lambdas did not fit on one line. - ibmw_gen writes a named factory function for a module whose registration lambda does not fit on one line, instead of wrapping the lambda inside the registration array; in-tree generated samples and the hand-written pkg_main files follow the same shape. Why: - The code check wants every line of a code block indented by a multiple of four spaces. clang-format indents a lambda body relative to the column of the lambda, so a lambda aligned after "(" or "{" puts the whole body at an odd column. No .clang-format option fixes this without re-indenting thousands of unrelated lines, so the code is shaped so that clang-format puts the bodies at statement level. Verification: - A repository-wide check for block lines with an indentation that is not a multiple of four reports 0 (was 302 lines in 77 places). - clang-format dry run over all tracked C/C++ files: 0 findings; generated-output format check: 0 changed lines; function metrics: 0. - build-ci: make -k without errors; ctest 75/75 passed. - ibmw_gen tests: 346 passed, only the known build-dir test fails. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): give file-scope globals the g_ camelBack names What: - The DDS communication trace source and its test, the bag command, the topic command stop flag (command_lifecycle.h and its users) and the managed exact candidate now name their mutable file-scope variables with the g_ prefix and camelBack, for example g_slots, g_binding, g_exactEnabled and g_stopRequested. - Two output statements in the DDS trace source are split so no line starts with "<<", and the exact-mode switch is computed from three named conditions before it is stored. The stored value is the same. Why: The code checker asks for one naming style for global variables. Only names and statement layout change; behaviour stays the same. command_lifecycle.h is not installed, so no public header changes. Verification: build-ci incremental build without errors, ctest 74/75: the bounded queue timing test BoundedBlockingQueueTest.StarvedSpinnerDoesNotStallSteadyPushes failed, and also failed in 2 of 3 runs alone. Its sources and test binary are not changed by this work; the cause was not investigated. Build and ctest were run on the final tree, not on each commit. Other checks: the trace source, its test and the candidate syntax-checked with communication trace on, clang-format clean, clang-tidy naming check finds no global variable names left (the candidate scan is partial: clang rejects a generated header). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(format): switch C and C++ sources to the OpenHarmony code style What: - Replace .clang-format with the OpenHarmony style required by the daily code check: 4-space indent, 120 columns, function left brace on its own line, braces on every if/for/while body, case labels indented. - Run clang-format 18 over all hand-written C and C++ files; the files generated by ibmw_gen (the kept *_gen samples and the template project) are left for the generator change that follows, except the headers the generator copies verbatim from the reformatted sources. - plain_dds_pubsub_type.h: the Fast DDS version #if now only switches the function signature, so both branches share one body brace; clang-format could not indent the old form. - Tests that search source text for a fixed indentation now use the new indentation or ignore it. Why: About 32 000 of the reported findings are layout rules (indentation, brace position, line width) that clang-format handles mechanically. This commit only changes whitespace, adds braces, splits long string literals and sorts using-declarations; a check of every file confirmed no other tokens changed and every #if branch keeps its brace balance. Verification: - Full build with -Werror: no errors; ctest: 75 of 75 passed - pytest src/tools/ibmw_gen/tests: 332 passed, 1 known failure (needs IBMW_BUILD_DIR) - scripts/tests: same results as before the change - scripts/check_clang_format.sh and its tests pass Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(cxx): declare one variable per statement and brace every body What: - Split every declaration that named more than one variable or member into one declaration per line (locals, struct and class members, and globals), in built and not-built sources alike. - Add braces to if bodies that sit in #if regions the formatter did not reach (core metrics, reporter hooks, the TBB run loop). - Put the return type on the same line as the function name in three places the formatter had split. - generic_dds_pubsub_type.h and the ROS 2 action fastdds_typesupport.h: the Fast DDS version #if now only switches the serialize/deserialize signature, so both branches share one body brace. The old form made clang-format lose track of the class, leaving members at column 0 and a wrong "namespace" comment on the class end. The generated action sample copy is regenerated from the fixed header. - Remove blank lines right before a closing brace (before catch, else, while and the end of C struct typedefs). Why: the daily code check requires one declaration per statement, braces on every body, the return type next to the function name and no blank line at the end of a block; clang-format alone does not cover these. Verification: clang-tidy readability-isolate-declaration and readability-braces-around-statements report 0 findings in repo files (82 and 8 before); full build-ci build has no errors; ctest 75/75; ibmw_gen pytest 341 passed with only the known test_cli_generation_is_complete_idempotent_and_buildable failure; scripts/tests all exit 0; clang-format --dry-run -Werror clean on all C/C++ files; generated code formatting check unformatted=0; license header check 0 changes. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(style): put a space between a qualifier and a following pointer mark What: - .clang-format: added "SpaceAroundPointerQualifiers: After", so a "*" or "&" that follows "const" is written with a space, for example "const char* const * argv" and "() const &". - Reformatted the 33 files this touches (CLI argument lists, crash handler frame arrays, DDS loan buffer, schema entry list, ref-qualified members). - Wrote the two "T const&" parameters and two "auto const&" loop variables as "const T&" / "const auto&" instead. Why: - The code checker requires a space between "const" and a pointer mark that follows it, and accepts "const * name". Doing it through clang-format keeps the rule enforced for new code; no other layout changes. Verification: - clang-format dry run over all tracked C/C++ files: clean; generated-code format check: clean. - build-ci full rebuild: no errors, no warnings; ctest 75/75 passed. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(style): put a space between a qualifier and a following pointer mark What: - .clang-format: added "SpaceAroundPointerQualifiers: After", so a "*" or "&" that follows "const" is written with a space, for example "const char* const * argv" and "() const &". - Reformatted the 33 files this touches (CLI argument lists, crash handler frame arrays, DDS loan buffer, schema entry list, ref-qualified members). - Wrote the two "T const&" parameters and two "auto const&" loop variables as "const T&" / "const auto&" instead. Why: - The code checker requires a space between "const" and a pointer mark that follows it, and accepts "const * name". Doing it through clang-format keeps the rule enforced for new code; no other layout changes. Verification: - clang-format dry run over all tracked C/C++ files: clean; generated-code format check: clean. - build-ci full rebuild: no errors, no warnings; ctest 75/75 passed. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(naming): use camelBack for parameters and local variables What: - Rename function parameters, local variables, local constants, static locals, structured bindings, lambda parameters, lambda init-captures and loop variables from snake_case (and UPPER_CASE local constants) to camelBack in the hand-written C/C++ sources, including function pointer parameter names in the C API structs. - Cover code clang-tidy cannot see: inactive #if branches (newer Fast DDS, OHOS, executor back-ends, test hook builds), files not in the CI build (ROS 2 samples, OHOS-only sources, extension tests, bench and selfdev tools) and locals declared inside function-like macros such as IBMW_PKG_MAIN and IBMW_USE_DRIVER(S). - Where a new name would clash with a name already in scope, pick a distinct name: the sample hello_msg.h constructor uses msgId/msg/ts, the shm transport driver's structured bindings are re-captured by name for the older OHOS clang, and one generic DDS type branch reuses the name the other branch already declares. - Update comments that name the parameters (/*name=*/ argument comments, @param, \p and inline prose). - Re-run clang-format on every changed file. - Members, types, enum values, globals, namespace constants, functions, macros, macro parameters and third-party code are unchanged. Why: the daily code check requires camelBack names for parameters and local variables. Verification: clang-tidy readability-identifier-naming for parameters and locals reports 0 findings in repo files; g++ -Wshadow over all build-ci sources shows no new warnings (two fewer); syntax checks of the core metrics/comm trace/test hook and fault/reporter build variants show no new errors; full build-ci build has no errors; ctest 75/75; mw_perf_collect pytest 968 passed, 2 skipped; core metrics pytest 215 passed; clang-format --dry-run -Werror clean on all C/C++ files; license header check 0 changes. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(extensions): rename internal members, constants and functions What: - Internal members of the record/playback, bag, DDS, SHM, iceoryx and other extensions now use camelBack, keeping the trailing underscore of private members; designated initializers follow the new names. - Internal constants and enum values now use UPPER_CASE without the "k" prefix. Playback stream results are named RECEIVE_OK, RECEIVE_ERROR and CLOSED to avoid the OK and ERROR macros. - The DDS communication trace helpers are named Mode and Active, also in the test-hook build branch. - Comments that mention a renamed name were updated. - Names kept: yaml-cpp convert specializations, size() and what() required by templates and std::exception, the action wire contract and Fast DDS type support names reached from installed headers, and the test mirror of the C ABI structure fields. Why: - The code checker asks for one naming style; these names are internal. Verification: - build-ci and a second build with the optional transports and features turned on: no errors; ctest 75/75 passed. - Files that are not built in these configurations were compared with the previous commit by a syntax check: no new errors. - clang-format dry run over all tracked C/C++ files: clean; generated code format check, function size check and license check: clean. - A search for every old name finds only uses that belong to other scopes (public API names, message fields, other classes). Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(format): switch C and C++ sources to the OpenHarmony code style What: - Replace .clang-format with the OpenHarmony style required by the daily code check: 4-space indent, 120 columns, function left brace on its own line, braces on every if/for/while body, case labels indented. - Run clang-format 18 over all hand-written C and C++ files; the files generated by ibmw_gen (the kept *_gen samples and the template project) are left for the generator change that follows, except the headers the generator copies verbatim from the reformatted sources. - plain_dds_pubsub_type.h: the Fast DDS version #if now only switches the function signature, so both branches share one body brace; clang-format could not indent the old form. - Tests that search source text for a fixed indentation now use the new indentation or ignore it. Why: About 32 000 of the reported findings are layout rules (indentation, brace position, line width) that clang-format handles mechanically. This commit only changes whitespace, adds braces, splits long string literals and sorts using-declarations; a check of every file confirmed no other tokens changed and every #if branch keeps its brace balance. Verification: - Full build with -Werror: no errors; ctest: 75 of 75 passed - pytest src/tools/ibmw_gen/tests: 332 passed, 1 known failure (needs IBMW_BUILD_DIR) - scripts/tests: same results as before the change - scripts/check_clang_format.sh and its tests pass Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago |
| Files | Last commit | Last update |
|---|---|---|
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago |