-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
fix a few minor issues flagged by lgtm #25873
Conversation
files in the deps folder should be modified by submitting a patch to the relevent upstream project. the other stuff looks fine. |
deps/v8/src/inspector/PRESUBMIT.py
Outdated
@@ -17,7 +17,7 @@ def _CompileScripts(input_api, output_api): | |||
local_paths = [f.LocalPath() for f in input_api.AffectedFiles()] | |||
|
|||
compilation_related_files = [ | |||
"js_protocol.json" | |||
"js_protocol.json", |
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.
This is V8 issue. Can you report it there?
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.
It looks like this file was deleted upstream in October last year. I'll back this change out in any case.
lib/internal/http2/core.js
Outdated
@@ -1820,7 +1820,7 @@ class Http2Stream extends Duplex { | |||
req.handle = handle; | |||
const err = handle.shutdown(req); | |||
if (err === 1) // synchronous finish | |||
return afterShutdown.call(req, 0); | |||
return afterShutdown.call(req); |
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.
I haven't traced through the C++ side here, but Isuspect that in the async case, .oncomplete is called with an arg, a status. It happens that afterShutdown() doesn't use it ATM, but if it ever did, this sync call here would be wrong for not passing success/0
. Maybe it would be better for afterShutdown() to add the arg, and then comment that its not used?
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.
@sam-github Your assumptions are correct 👍
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.
Sure, I can make that change.
/cc @refack (last person who synced cpplint) |
The lines being changed in this PR is from one of our floating patches: cbc3dd9#diff-648c2189bda313e553284785c602c91d |
Shall I leave this part as is in that case? |
Sure. |
CI: https://ci.nodejs.org/job/node-test-pull-request/20592/ @sam-github you copacetic with current state? |
Great, the CI passed. |
* Confusing (but correct) regex using `A-z` character range by accident * Add the status argument to afterShutdown PR-URL: #25873 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
@rneatherway thanks for the contribution! |
* Confusing (but correct) regex using `A-z` character range by accident * Add the status argument to afterShutdown PR-URL: #25873 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Thanks for merging :-) If you'd like to know if these kinds of issues pop up on PRs in the future you can enable our code review integration at https://lgtm.com/projects/g/nodejs/node/ci/ |
ignore some files
A-z
character range byaccident
I'm one of the developers behind https://lgtm.com and I was browsing the nodejs code over there at https://lgtm.com/projects/g/nodejs/node. I found these fairly simple issues that I could fix, hope this is helpful.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes