From 05a653c30420c53a0118c6cb46db3191f3a6a841 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 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. --- 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 68801eeb54eb31..b39bcf5af2c7b3 100644 --- a/src/node_http2.h +++ b/src/node_http2.h @@ -309,7 +309,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')