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

refactor: "for loop" - argv to config; in main_executor.js #183

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

Conversation

Pranav-yadav
Copy link

  • use const for the loop variable, as it's not modified in the body
  • use shorthand syntax for: config[value] = (argv[value] === true ? true : (config[value] ?? false)); as;
    config[value] ||= argv[value] === true;

- use `const` for the loop variable, as it's *not* modified in the body
- use shorthand syntax for:
`config[value] = (argv[value] === true ? true : (config[value] ?? false));`
as;
`config[value] ||= argv[value] === true;`
@cla-bot
Copy link

cla-bot bot commented Mar 30, 2023

We require contributors/corporates @Pranav-yadav to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document

Comment on lines +116 to 118
for (const value of ['debug', 'unsigned', 'execute', 'tracer', 'counters', 'skip', 'verbose']) {
config[value] ||= argv[value] === true;
}
Copy link
Author

@Pranav-yadav Pranav-yadav Mar 30, 2023

Choose a reason for hiding this comment

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

Though, not that it's better or worse, I would use even more specific syntax like below; @zkronos73 WDYT?

Suggested change
for (const value of ['debug', 'unsigned', 'execute', 'tracer', 'counters', 'skip', 'verbose']) {
config[value] ||= argv[value] === true;
}
['debug', 'unsigned', 'execute', 'tracer', 'counters', 'skip', 'verbose'].forEach((value) => {
config[value] ||= argv[value] === true;
});

@Pranav-yadav
Copy link
Author

Also, what's the exact procedure of signing cla for this repo. I read it. Now what? Is there website where I have to click signed?
@zkronos73 sorry for the extra ping, but the CLA flow is confusing here...

@sonarcloud
Copy link

sonarcloud bot commented Oct 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@krlosMata krlosMata marked this pull request as draft March 4, 2024 14:54
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.

1 participant