-
Notifications
You must be signed in to change notification settings - Fork 252
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
Add comments to make the codebase easier to understand #647
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall great work! Love the comments, just a little unhappy with the removal of brackets.
Although it technically may evaluate out the same, brackets for code clarity can never hurt.
Thanks for these changes though!
proc.stderr.on('data', async data => { | ||
if (event_bus !== null) { | ||
event_bus.emit('stderr', data); | ||
} else if ((stderr.length + data.length) > this.runtime.output_max_size) { | ||
} else if ( | ||
stderr.length + data.length > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A little personal thing for me is putting expressions before comparing operators like this in brackets - in my mind it helps clear up order of operations.
proc.stdout.on('data', async data => { | ||
if (event_bus !== null) { | ||
event_bus.emit('stdout', data); | ||
} else if ((stdout.length + data.length) > this.runtime.output_max_size) { | ||
} else if ( | ||
stdout.length + data.length > |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same this as before with the brackets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank for the review @HexF
The added curly braces must are unintended formatting mistake, I'll fix that
used jsdoc to document the following files: