| Files | Last commit | Last update |
|---|---|---|
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 the .cpp suffix for C++ source files What: rename every C++ source file in the repository from .cc to .cpp (824 files, with git history kept as renames) and update the build lists, scripts, tests, configs, docs and source comments that name them. The project generators (ibmw-gen and ibmw_cli) now write .cpp files for new projects; when a project being regenerated already holds .cc sources from an earlier run, the generators keep .cc for it so the user's files and CMake lists stay consistent. A small helper picks the suffix from the output directory, and new tests cover both the new and the legacy case. Generated CMake lists from ibmw_cli accept both suffixes. The in-tree generated samples and the template project are regenerated with the new names. Why: the code check requires C++ source files to use the .cpp suffix. Verification: full build with 0 errors; ctest 75/75 passed; ibmw-gen tests 341 passed with only the known environment-dependent failure; mw_perf_collect tests 968 passed, 2 skipped; core metrics tests 215 passed; shell tests show only the three known environment failures; clang-format, generated-code format, license header, docs governance and release hygiene checks pass. Signed-off-by: fanglinxu <fanglinxu@huawei.com> | 5 days ago | |
refactor(naming): use the .cpp suffix for C++ source files What: rename every C++ source file in the repository from .cc to .cpp (824 files, with git history kept as renames) and update the build lists, scripts, tests, configs, docs and source comments that name them. The project generators (ibmw-gen and ibmw_cli) now write .cpp files for new projects; when a project being regenerated already holds .cc sources from an earlier run, the generators keep .cc for it so the user's files and CMake lists stay consistent. A small helper picks the suffix from the output directory, and new tests cover both the new and the legacy case. Generated CMake lists from ibmw_cli accept both suffixes. The in-tree generated samples and the template project are regenerated with the new names. Why: the code check requires C++ source files to use the .cpp suffix. Verification: full build with 0 errors; ctest 75/75 passed; ibmw-gen tests 341 passed with only the known environment-dependent failure; mw_perf_collect tests 968 passed, 2 skipped; core metrics tests 215 passed; shell tests show only the three known environment failures; clang-format, generated-code format, license header, docs governance and release hygiene checks 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(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 |
| Files | Last commit | Last update |
|---|---|---|
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago | ||
| 5 days ago |