lib: fix a few minor issues flagged by lgtm

* Confusing (but correct) regex using `A-z` character range by
  accident
* Add the status argument to afterShutdown

PR-URL: https://github.com/nodejs/node/pull/25873
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
This commit is contained in:
Robin Neatherway 2019-01-30 12:55:54 -05:00 committed by Refael Ackermann
parent 91adbe14b4
commit 106dd1e345
2 changed files with 3 additions and 2 deletions

View File

@ -1515,7 +1515,8 @@ function streamOnPause() {
this[kHandle].readStop();
}
function afterShutdown() {
function afterShutdown(status) {
// Currently this status value is unused
this.callback();
const stream = this.handle[kOwner];
if (stream)

2
tools/cpplint.py vendored
View File

@ -636,7 +636,7 @@ _NULL_TOKEN_PATTERN = re.compile(r'\bNULL\b')
_RIGHT_LEANING_POINTER_PATTERN = re.compile(r'[^=|(,\s><);&?:}]'
r'(?<!(sizeof|return))'
r'\s\*[a-zA-z_][0-9a-zA-z_]*')
r'\s\*[a-zA-Z_][0-9a-zA-Z_]*')
_regexp_compile_cache = {}