Skip to content

Conversation

@mertcanaltin
Copy link
Member

@mertcanaltin mertcanaltin commented Mar 25, 2025

This change narrows the scope of local variables to within the loop to improve code clarity and reduce the risk of variable misuse. Although purely stylistic, it helps with maintainability.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/config

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. config Issues or PRs related to the config subsystem needs-ci PRs that need a full CI run. labels Mar 25, 2025
@codecov
Copy link

codecov bot commented Mar 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.52%. Comparing base (a65421a) to head (5168ceb).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57626      +/-   ##
==========================================
- Coverage   88.54%   88.52%   -0.03%     
==========================================
  Files         703      703              
  Lines      208545   208545              
  Branches    40216    40222       +6     
==========================================
- Hits       184652   184607      -45     
- Misses      15905    15950      +45     
  Partials     7988     7988              
Files with missing lines Coverage Δ
src/node_dotenv.cc 84.72% <100.00%> (ø)

... and 25 files with indirect coverage changes

🚀 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
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

There's no harm in this, but ideally the commit message would describe the motivation for this change as well, esp. since it is a purely stylistic one

@mertcanaltin mertcanaltin changed the title src: collapsed the scope of local variables into the loop src: collapse local var scope in loop Mar 28, 2025
@mertcanaltin mertcanaltin force-pushed the mert/refactor/to_object_local_vars branch from 0f15e9d to 426d089 Compare March 28, 2025 18:54
@mertcanaltin
Copy link
Member Author

There's no harm in this, but ideally the commit message would describe the motivation for this change as well, esp. since it is a purely stylistic one

Thanks, I edited

@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 6, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 6, 2025
@nodejs-github-bot
Copy link
Collaborator

@anonrig anonrig added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 25, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 25, 2025
@nodejs-github-bot
Copy link
Collaborator

@mertcanaltin
Copy link
Member Author

Thanks for the review. I'm closing this PR because C++ already optimizes local variables, and the new scope is more appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. config Issues or PRs related to the config subsystem needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants