Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: collapse local var scope in loop #57626

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
Copy link

codecov bot commented Mar 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.23%. Comparing base (af75d04) to head (426d089).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #57626      +/-   ##
==========================================
- Coverage   90.23%   90.23%   -0.01%     
==========================================
  Files         630      630              
  Lines      185055   185055              
  Branches    36221    36223       +2     
==========================================
- Hits       166984   166976       -8     
+ Misses      11043    11041       -2     
- Partials     7028     7038      +10     
Files with missing lines Coverage Δ
src/node_dotenv.cc 85.71% <100.00%> (ø)

... and 19 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

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.

3 participants