diff --git hbase-native-client/Makefile hbase-native-client/Makefile index 64cef06..be5d461 100644 --- hbase-native-client/Makefile +++ 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) diff --git hbase-native-client/bin/cpplint.sh hbase-native-client/bin/cpplint.sh new file mode 100755 index 0000000..52ca581 --- /dev/null +++ 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 diff --git hbase-native-client/bin/format-code.sh hbase-native-client/bin/format-code.sh index cc8b368..331717a 100755 --- hbase-native-client/bin/format-code.sh +++ 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