From 9528ee4a42eb0729a4467ddaaa3be573d9053fa2 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sun, 1 Jul 2018 14:18:49 +0200 Subject: Add cpplint to third_party --- .gclient | 5 +++++ .gitignore | 1 + tools/lint.sh | 6 +++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gclient b/.gclient index ec0dd52e5..5943d3d57 100644 --- a/.gclient +++ b/.gclient @@ -30,6 +30,11 @@ solutions = [{ 'https://chromium.googlesource.com/chromium/src/third_party/zlib@39b4a6260702da4c089eca57136abf40a39667e9', 'name': 'third_party/zlib' +}, { + 'url': + 'https://github.com/cpplint/cpplint.git@a33992f68f36fcaa6d0f531a25012a4c474d3542', + 'name': + 'third_party/cpplint' }, { 'url': 'https://github.com/rust-lang/libc.git@8a85d662b90c14d458bc4ae9521a05564e20d7ae', diff --git a/.gitignore b/.gitignore index 3e495ea25..12cf21c76 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules /v8/ /tools/protoc_wrapper/ +/third_party/cpplint/ /third_party/protobuf/ /third_party/zlib/ /third_party/rust_crates/libc/ diff --git a/tools/lint.sh b/tools/lint.sh index c14cfa50d..5822a1cb6 100755 --- a/tools/lint.sh +++ b/tools/lint.sh @@ -1,7 +1,11 @@ #!/bin/sh +# TODO(ry) Rewrite this script in python for portability to Windows. +# TODO(ry) Call tslint here too. set -e cd `dirname "$0"`/.. -cpplint --filter=-build/include_subdir --repository=src \ +./third_party/cpplint/cpplint.py \ + --filter=-build/include_subdir \ + --repository=src \ src/*.cc \ src/*.h \ src/include/*.h -- cgit v1.2.3