Repository: hbase Updated Branches: refs/heads/HBASE-14850 78c8bc779 -> 99ccddff5
HBASE-17218 [C++] Use Google Style guide and cpplint Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/99ccddff Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/99ccddff Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/99ccddff Branch: refs/heads/HBASE-14850 Commit: 99ccddff5a168184998e8d41ff35a75c0f602c8d Parents: 78c8bc7 Author: Enis Soztutar <[email protected]> Authored: Mon Dec 5 15:10:28 2016 -0800 Committer: Enis Soztutar <[email protected]> Committed: Mon Dec 5 15:10:28 2016 -0800 ---------------------------------------------------------------------- hbase-native-client/Makefile | 3 +++ hbase-native-client/bin/cpplint.sh | 27 +++++++++++++++++++++++++++ hbase-native-client/bin/format-code.sh | 2 +- 3 files changed, 31 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/99ccddff/hbase-native-client/Makefile ---------------------------------------------------------------------- diff --git a/hbase-native-client/Makefile b/hbase-native-client/Makefile index 64cef06..be5d461 100644 --- a/hbase-native-client/Makefile +++ b/hbase-native-client/Makefile @@ -116,6 +116,9 @@ $(foreach bdir,$(RELEASE_BUILD_DIR),$(eval $(call make-goal-rel,$(bdir)))) check: $(shell buck test --all --no-results-cache) +lint: + bin/cpplint.sh + doc: $(shell doxygen hbase.doxygen > /dev/null) http://git-wip-us.apache.org/repos/asf/hbase/blob/99ccddff/hbase-native-client/bin/cpplint.sh ---------------------------------------------------------------------- diff --git a/hbase-native-client/bin/cpplint.sh b/hbase-native-client/bin/cpplint.sh new file mode 100644 index 0000000..52ca581 --- /dev/null +++ b/hbase-native-client/bin/cpplint.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +## +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +IFS=$'\n\t' + +CPPLINT_LOC=https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py +OUTPUT=build/cpplint.py + +# Download if not already there +wget -nc $CPPLINT_LOC -O $OUTPUT + +# Execute the script +find core connection serde utils test-util -name "*.h" -or -name "*.cc" | xargs -P8 python $OUTPUT http://git-wip-us.apache.org/repos/asf/hbase/blob/99ccddff/hbase-native-client/bin/format-code.sh ---------------------------------------------------------------------- diff --git a/hbase-native-client/bin/format-code.sh b/hbase-native-client/bin/format-code.sh index cc8b368..331717a 100755 --- a/hbase-native-client/bin/format-code.sh +++ b/hbase-native-client/bin/format-code.sh @@ -19,5 +19,5 @@ set -euo pipefail IFS=$'\n\t' -find core connection serde utils test-util -name "*.h" -or -name "*.cc" | xargs -P8 clang-format -i +find core connection serde utils test-util -name "*.h" -or -name "*.cc" | xargs -P8 clang-format -i --style=Google find core connection serde utils third-party -name "BUCK" | xargs -P8 yapf -i
