Take the LoadContext of findStackAnalyzerSection by const reference
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 90/100
Research direction
Open src/App/ToolConfig.cpp at findStackAnalyzerSection (around line 1074); the issue identifies the parameter change and explains why ApplyFn handlers should stay unchanged. Change only that parameter, then run the listed CMake build, ctest, and ./scripts/format-check.sh. Done when the build and tests pass and no other code changes are made.
Written by the indexing model from the issue text.
Description
findStackAnalyzerSection (src/App/ToolConfig.cpp:1074) takes LoadContext& ctx, but only calls ctx.deprecated(...), which is a const member function. The initial static analysis flagged it twice: cppcheck's constParameterReference and the stack analyzer's ConstParameterNotModified.Reference (docs/quality/static-analysis-initial.md).
To do: change the parameter to const LoadContext& ctx.
Leave the configuration handlers (ApplyFn) as they are. They also take LoadContext& and are flagged too, but they write the configuration through ctx.config. config is a reference, so a const LoadContext& would still compile, but it would hide that these handlers modify the configuration.
Check:
cmake --build build --parallel 4
ctest --test-dir build --output-on-failure
./scripts/format-check.sh
Acceptance
findStackAnalyzerSectiontakesconst LoadContext&; nothing else changes.- The build (warnings are errors) and
ctestpass.
From the technical debt register (docs/quality/technical-debt.md, D11).
- Dominant language
- C++
- Stars
- 5
- Forks
- 4
- Avg merge
- 1h 2m
- Merged PRs (30d)
- 74
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from CoreTrace/coretrace
-
documentation severity/minor
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
build severity/minor
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
build good first issue severity/minor
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
test: add unit tests for ctrace::RunDirectoryPossibly taken @tecnolgd claimed this 1 day ago. Opengood first issue test
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
CoreTrace/coretrace#164 · 2 comments · 1 assignee ·
Maintainers usually reply within 1 day
-
build severity/minor
Difficulty 3/5 1-2 days Newbie friendliness 69/100
Maintainers usually reply within 1 day
All issues in CoreTrace/coretrace
Similar issues
-
ai_p1 comp-message-queues
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
ClickHouse/ClickHouse#125890 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
redis/memtier_benchmark#642 ·
Maintainers usually reply within 1 day
-
Ctrl-C can abort a node: the state timer asks for the node names after shutdownPossibly taken @fmrico claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
fmrico/cascade_lifecycle#24 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100