From 9bca6200adb03217504a1279833affb652357cd1 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 23 Oct 2017 08:07:09 +0200 Subject: [PATCH] src: remove empty comment in node_http2.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit removes an "empty" comment in node_http2.h that I don't think was intentional and as far as I can tell not a doxygen comment or anything like that. This was not picked up by the cpp linter so a suggestion has also been added to the CheckComment function to detect these in the future. PR-URL: https://github.com/nodejs/node/pull/16400 Reviewed-By: Gireesh Punathil Reviewed-By: Anatoli Papirovski Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca --- src/node_http2.h | 1 - tools/cpplint.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node_http2.h b/src/node_http2.h index b416243823a09d..3e90c49cd77b6b 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -333,7 +333,6 @@ class Http2Options { static const size_t kAllocBufferSize = 64 * 1024; -//// typedef uint32_t(*get_setting)(nghttp2_session* session, nghttp2_settings_id id); diff --git a/tools/cpplint.py b/tools/cpplint.py index 845f2d2f39de01..241195f0762709 100644 --- a/tools/cpplint.py +++ b/tools/cpplint.py @@ -3021,7 +3021,7 @@ def CheckComment(line, filename, linenum, next_line_start, error): # If the comment contains an alphanumeric character, there # should be a space somewhere between it and the // unless # it's a /// or //! Doxygen comment. - if (Match(r'//[^ ]*\w', comment) and + if (Match(r'(?://[^ ]*\w)|(?:////\s*$)', comment) and not Match(r'(///|//\!)(\s+|$)', comment)): error(filename, linenum, 'whitespace/comments', 4, 'Should have a space between // and comment')