approvals / approvals/ApprovalTests.cpp

ApprovalTests.v.8.3.0.hpp(2385): warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).

Open
#100 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug on_hold
Dominant language
C++
Stars
339
Forks
55
PR merge metrics
No merged PRs in 30d

Description

Looking at the results of Visual Studio code analysis on my project using the default Microsoft Native Recommended Rules with the latest ApprovalTests header I see this warning:

ApprovalTests.v.8.3.0.hpp(2385): warning C26444: Avoid unnamed objects with custom construction and destruction (es.84).

        explicit CIBuildOnlyReporter(std::shared_ptr<Reporter> reporter = std::make_shared<QuietReporter>())
            : m_reporter(reporter)
        {
        }

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ApprovalTests.v.8.3.0.hpp at the CIBuildOnlyReporter constructor around line 2385, then reproduce the reported Microsoft Native Recommended Rules analysis in Visual Studio. Trace the unnamed-object warning and confirm that the completed change removes or appropriately addresses warning C26444 without changing reporter behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.