This is an automated email from the ASF dual-hosted git repository.

bbannier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git

commit bb75f8234e0082deb826c60b74916f856edaced0
Author: Benjamin Bannier <[email protected]>
AuthorDate: Sat Mar 2 22:29:47 2019 +0100

    Parameterized cpplint extension list via config instead of via patch.
    
    With this patch we also restrict cpplint to only examine source files
    with extension `.cpp` or `.hpp` which covers all Mesos C++ source
    files.
    
    Review: https://reviews.apache.org/r/70099
---
 support/cpplint.py     | 2 +-
 support/mesos-style.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/support/cpplint.py b/support/cpplint.py
index 0227d32..310da0e 100644
--- a/support/cpplint.py
+++ b/support/cpplint.py
@@ -590,7 +590,7 @@ _line_length = 80
 
 # The allowed extensions for file names
 # This is set by --extensions flag.
-_valid_extensions = set(['cc', 'h', 'cpp', 'cu', 'cuh', 'hpp'])
+_valid_extensions = set(['cc', 'h', 'cpp', 'cu', 'cuh'])
 
 # Treat all headers starting with 'h' equally: .h, .hpp, .hxx etc.
 # This is set by --headers flag.
diff --git a/support/mesos-style.py b/support/mesos-style.py
index b14820a..22793cf 100755
--- a/support/mesos-style.py
+++ b/support/mesos-style.py
@@ -287,7 +287,7 @@ class CppLinter(LinterBase):
         # We do not use a version of cpplint available through pip as
         # we use a custom version (see cpplint.path) to lint C++ files.
         process = subprocess.Popen(
-            [sys.executable, 'support/cpplint.py',
+            [sys.executable, 'support/cpplint.py', '--extensions=hpp,cpp',
              rules_filter] + source_paths,
             stderr=subprocess.PIPE,
             close_fds=True)

Reply via email to