Skip to content

refactor(configuration): simplify boolean check#6158

Merged
maryliag merged 2 commits intoopen-telemetry:mainfrom
cjihrig:bool
Nov 24, 2025
Merged

refactor(configuration): simplify boolean check#6158
maryliag merged 2 commits intoopen-telemetry:mainfrom
cjihrig:bool

Conversation

@cjihrig
Copy link
Copy Markdown
Contributor

@cjihrig cjihrig commented Nov 24, 2025

Which problem is this PR solving?

A disabled check in the configuration package is a little confusing to read. The value can be true, false, or undefined. Instead of checking for a truthy or false value, the code can be simplified to only a check for undefined.

Fixes # N/A

Short description of the changes

This commit updates the confusing check to a single undefined check.

Type of change

None of these.

How Has This Been Tested?

  • Test suite

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

@cjihrig cjihrig requested a review from a team as a code owner November 24, 2025 18:22
Comment thread experimental/CHANGELOG.md Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.40%. Comparing base (8ff6b76) to head (3eafadf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6158   +/-   ##
=======================================
  Coverage   95.40%   95.40%           
=======================================
  Files         317      317           
  Lines        9427     9427           
  Branches     2178     2178           
=======================================
  Hits         8994     8994           
  Misses        433      433           
Files with missing lines Coverage Δ
...al/packages/configuration/src/FileConfigFactory.ts 96.85% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@raphael-theriault-swi raphael-theriault-swi left a comment

Choose a reason for hiding this comment

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

LGTM but I'd still like @maryliag to give her approval :)

@maryliag maryliag added this pull request to the merge queue Nov 24, 2025
Merged via the queue into open-telemetry:main with commit 2e6980e Nov 24, 2025
27 checks passed
@otelbot
Copy link
Copy Markdown
Contributor

otelbot Bot commented Nov 24, 2025

Thank you for your contribution @cjihrig! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

@cjihrig cjihrig deleted the bool branch November 24, 2025 22:21
@otelbot-js otelbot-js Bot mentioned this pull request Jan 7, 2026
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