| Files | Last commit | Last update |
|---|---|---|
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(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(selfdev): split long functions in the benchmarks What: - The shared option parser handles each option in a helper with early returns. - The coroutine benchmark moves the frame-size and allocation reports out of main. - The queue benchmark moves the executor loop of the multi-producer case and the consumer of the burst case into helpers. - The stack benchmark splits main into one helper per comparison and one for the output-size report. Why: These functions were over the limits for length or nesting depth. The measured regions, case names and output are unchanged. Verification: - Size check on selfdev/bench: no violations. - The benchmarks are not built in the CI configuration; all four were syntax-checked with g++ -fsyntax-only -Wall -Wextra. The queue benchmark was built and run: same results as before within noise, and a bad option still prints the usage and exits with 2. 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(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(selfdev): split long functions in the benchmarks What: - The shared option parser handles each option in a helper with early returns. - The coroutine benchmark moves the frame-size and allocation reports out of main. - The queue benchmark moves the executor loop of the multi-producer case and the consumer of the burst case into helpers. - The stack benchmark splits main into one helper per comparison and one for the output-size report. Why: These functions were over the limits for length or nesting depth. The measured regions, case names and output are unchanged. Verification: - Size check on selfdev/bench: no violations. - The benchmarks are not built in the CI configuration; all four were syntax-checked with g++ -fsyntax-only -Wall -Wextra. The queue benchmark was built and run: same results as before within noise, and a bad option still prints the usage and exits with 2. 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 |