Skip to content

Conversation

@marcosbento
Copy link
Contributor

@marcosbento marcosbento commented Jan 23, 2026

Description

Implement changes requested by https://jira.ecmwf.int/browse/ECKIT-650.

Contributor Declaration

By opening this pull request, I affirm the following:

  • All authors agree to the Contributor License Agreement.
  • The code follows the project's coding standards.
  • I have performed self-review and added comments where needed.
  • I have added or updated tests to verify that my changes are effective and functional.
  • I have run all existing tests and confirmed they pass.

🌦️ >> Documentation << 🌦️
https://sites.ecmwf.int/docs/dev-section/eckit/pull-requests/PR-248

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the deprecated BaseOption::setDefaultValue() method and updates code to specify default values via constructor parameters instead of the deprecated fluent API method.

Changes:

  • Removed deprecated BaseOption::setDefaultValue() method from Option.h
  • Updated BaseOption constructor to use forwarding reference (T&&) instead of const lvalue reference (const T&)
  • Fixed incorrect base class constructor call in VectorOption.cc
  • Updated test to use constructor-based default value specification with C++17 CTAD

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/eckit/option/Option.h Removes deprecated defaultValue() method and changes constructor parameter from const T& to T&&
src/eckit/option/VectorOption.cc Fixes incorrect base constructor call that was wrapping parameters in non-existent Option() constructor
tests/option/eckit_test_option_cmdargs.cc Updates test to use constructor-based default values with CTAD instead of deprecated defaultValue() method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.22%. Comparing base (f8ad909) to head (83b5e6a).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #248      +/-   ##
===========================================
- Coverage    66.25%   66.22%   -0.03%     
===========================================
  Files         1131     1131              
  Lines        57959    57952       -7     
  Branches      4394     4394              
===========================================
- Hits         38398    38380      -18     
- Misses       19561    19572      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcosbento marcosbento force-pushed the feature/remove_deprecated_baseoption_default_value branch from 22a7e43 to b61312d Compare January 23, 2026 13:07
This change takes the default value by value and moves it into the
optional data member.

Re ECKIT-650
@marcosbento marcosbento force-pushed the feature/remove_deprecated_baseoption_default_value branch from b61312d to 83b5e6a Compare January 28, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants