From 8a667ff35b19c938e6727924a2a409c6831fc59e Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Thu, 31 Aug 2023 11:17:39 +0200 Subject: [PATCH 1/2] Forgot to add the script --- tools/lint.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 tools/lint.sh diff --git a/tools/lint.sh b/tools/lint.sh new file mode 100755 index 000000000..aff0a5027 --- /dev/null +++ b/tools/lint.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Copyright 2023 Google LLC +# +# Licensed 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. + +DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +echo $DIR + +echo -- Boilerplate check -- +python3 tools/check_boilerplate.py $PWD + +echo -- Terraform format -- +terraform fmt -recursive -check -diff $PWD + +echo -- READMEs -- +python3 tools/check_documentation.py --no-show-summary modules fast blueprints + +echo -- Links -- +python3 tools/check_links.py --no-show-summary $PWD + +echo -- FAST Names -- +python3 tools/check_names.py --prefix-length=10 --failed-only fast/stages + +echo -- Python formatting -- +yapf --style="{based_on_style: google, indent_width: 2, SPLIT_BEFORE_NAMED_ASSIGNS: false}" -p -d \ + tools/*.py \ + blueprints/cloud-operations/network-dashboard/src/*py \ + blueprints/cloud-operations/network-dashboard/src/plugins/*py + +echo -- Blueprint metadata -- +python tools/validate_metadata.py -v blueprints --verbose --failed-only From 5591dabdc537a774789bfb8731fbe8e91a2c02d6 Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Thu, 31 Aug 2023 11:20:25 +0200 Subject: [PATCH 2/2] Remove print --- tools/lint.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/lint.sh b/tools/lint.sh index aff0a5027..580777b00 100755 --- a/tools/lint.sh +++ b/tools/lint.sh @@ -16,8 +16,6 @@ DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -echo $DIR - echo -- Boilerplate check -- python3 tools/check_boilerplate.py $PWD