Add support for pre-commit hook/linting
.pre-commit-config.yaml
-----------------------
o Create initial config for pre-commit hook.
misc/*
o Basic inline cleanups courtesy of the pre-commit hook.
Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
Change-Id: I6aa20216ade22b1a7406e8358864fb245842b713
diff --git a/.editorconfig b/.editorconfig
index 5eb4e67..37dfc4d 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -22,4 +22,3 @@
[*.yaml]
indent_size = 4
-
diff --git a/.gitreview b/.gitreview
index 923de6d..33e487a 100644
--- a/.gitreview
+++ b/.gitreview
@@ -2,4 +2,4 @@
host=gerrit.opencord.org
port=29418
project=ci-management.git
-defaultremote=origin
\ No newline at end of file
+defaultremote=origin
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
new file mode 100644
index 0000000..fb93a96
--- /dev/null
+++ b/.pre-commit-config.yaml
@@ -0,0 +1,62 @@
+---
+
+# See https://pre-commit.com for more information
+# See https://pre-commit.com/hooks.html for more hooks
+repos:
+- repo: https://github.com/pre-commit/pre-commit-hooks
+ rev: v3.2.0
+ hooks:
+ - id: trailing-whitespace
+ - id: end-of-file-fixer
+ - id: check-yaml
+ - id: check-added-large-files
+- repo: https://github.com/psf/black
+ rev: 22.10.0
+ hooks:
+ - id: black
+- repo: https://github.com/koalaman/shellcheck-precommit
+ rev: v0.10.0
+ hooks:
+ - id: shellcheck
+- repo: https://github.com/adrienverge/yamllint.git
+ rev: v1.35.1
+ hooks:
+ - id: yamllint
+
+# -------------------------------------------------------------------
+# https://docs.python.org/3/library/re.html#regular-expression-syntax
+# -------------------------------------------------------------------
+exclude: |
+ (?x)^(
+ ^jjb/.* |
+ ^jenkins-scripts/.* |
+ ^makefiles/.* |
+ ^lf/.* |
+ ^lf-ansible/.* |
+ ^packer/.* |
+ ^test/.* |
+ ^.venv/.* |
+ ^jjb/pipeline/voltha/voltha-physical-soak-dt-tests.groovy
+ )$
+
+
+# -----------------------------------------------------------------------
+# declare -a args=()
+# args+=('--color=always')
+#
+# if true; then
+# args+=('--all-files')
+# else
+# args+=('--files' 'jjb/pipeline/voltha/voltha-physical-soak-dt-tests.groovy')
+# fi
+#
+# freeze
+# args+=('--bleeding-edge')
+# args+=('--freeze')
+#
+# args+=('--show-diff-on-failure')
+#
+# pre-commit run "${args[@]}" &1 | tee log
+# -----------------------------------------------------------------------
+
+# [EOF]
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
index 626cd61..e57dd2e 100644
--- a/CODE_OF_CONDUCT.md
+++ b/CODE_OF_CONDUCT.md
@@ -1,3 +1,3 @@
We expect all ONF employees, member companies, and participants to abide by our [Code of Conduct](https://www.opennetworking.org/wp-content/themes/onf/img/onf-code-of-conduct.pdf).
-If you are being harassed, notice that someone else is being harassed, or have any other concerns involving someone’s welfare, please notify a member of the ONF team or email [conduct@opennetworking.org](conduct@opennetworking.org).
+If you are being harassed, notice that someone else is being harassed, or have any other concerns involving someone’s welfare, please notify a member of the ONF team or email [conduct@opennetworking.org](conduct@opennetworking.org).
diff --git a/README.md b/README.md
index 2ecc358..a554489 100644
--- a/README.md
+++ b/README.md
@@ -225,4 +225,3 @@
- [ONOS](https://gerrit.onosproject.org/gitweb?p=ci-management.git;a=tree)
- [ODL](https://git.opendaylight.org/gerrit/gitweb?p=releng/builder.git;a=tree)
- [ONAP](https://gerrit.onap.org/r/gitweb?p=ci-management.git;a=tree)
-
diff --git a/docs/jjb/voltha-test/voltha-nightly-jobs/README.md b/docs/jjb/voltha-test/voltha-nightly-jobs/README.md
index 4671762..6f53790 100644
--- a/docs/jjb/voltha-test/voltha-nightly-jobs/README.md
+++ b/docs/jjb/voltha-test/voltha-nightly-jobs/README.md
@@ -45,4 +45,3 @@
- Beneath the job subdir create individual release.yaml config files.
- voltha-nightly-jobs/voltha-2.12.yaml will eventually become monolithic as releases progress.
- Splitting configs based on job set would help reduce this config as well.
-
diff --git a/jenkins-scripts/README b/jenkins-scripts/README
index 0c74035..a336203 100644
--- a/jenkins-scripts/README
+++ b/jenkins-scripts/README
@@ -20,4 +20,3 @@
# clean-up from the init run
rm -rf /ci-management
-
diff --git a/jenkins-scripts/basic_settings.sh b/jenkins-scripts/basic_settings.sh
index 3276d55..a12ef5a 100755
--- a/jenkins-scripts/basic_settings.sh
+++ b/jenkins-scripts/basic_settings.sh
@@ -36,4 +36,3 @@
[gerrit.onosproject.org]:29418 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBMBzs9fkmwgIqvYavMlIFz95RzDoSBQxHIeBj2BuDz0HLz2qrW2Q2Rksq4OwsAuSjRto3+9/BgIKv1ONnh21KMM=
[gerrit.onosproject.org]:29418 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKkIOHzFGowb9yL7FcWD73YF/xDUQ23/As/HAP3flf/L
EOKNOWN
-
diff --git a/jjb/pipeline/fossa-verify.groovy b/jjb/pipeline/fossa-verify.groovy
index da5c0e9..9974215 100644
--- a/jjb/pipeline/fossa-verify.groovy
+++ b/jjb/pipeline/fossa-verify.groovy
@@ -155,4 +155,3 @@
}
}
}
-
diff --git a/jjb/pipeline/voltha/bbsim-tests.groovy b/jjb/pipeline/voltha/bbsim-tests.groovy
index b0ba1a3..e71b94c 100644
--- a/jjb/pipeline/voltha/bbsim-tests.groovy
+++ b/jjb/pipeline/voltha/bbsim-tests.groovy
@@ -496,7 +496,7 @@
enter("exitStatus=${exitStatus}")
banner('collectArtifacts')
}
-
+
dotkube(['debug':false])
getPodsInfo("$WORKSPACE/${exitStatus}")
diff --git a/jjb/pipeline/voltha/voltha-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-physical-functional-tests.groovy
index 61c85b6..3aa50e8 100644
--- a/jjb/pipeline/voltha/voltha-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-physical-functional-tests.groovy
@@ -106,7 +106,7 @@
deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}.yaml"
}
installVoltctl("${branch}")
-
+
sh(returnStdout: false, script: """
mkdir -p "$WORKSPACE/bin"
diff --git a/jjb/pipeline/voltha/voltha-tt-physical-functional-tests.groovy b/jjb/pipeline/voltha/voltha-tt-physical-functional-tests.groovy
index 6cebea7..6f68e70 100644
--- a/jjb/pipeline/voltha/voltha-tt-physical-functional-tests.groovy
+++ b/jjb/pipeline/voltha/voltha-tt-physical-functional-tests.groovy
@@ -112,7 +112,7 @@
{
deployment_config = readYaml file: "${configBaseDir}/${configDeploymentDir}/${configFileName}-TT.yaml"
}
-
+
installVoltctl("${branch}")
sh returnStdout: false, script: """
diff --git a/jjb/repos/voltha-helm-charts.yaml b/jjb/repos/voltha-helm-charts.yaml
index af82fc4..28ec08e 100644
--- a/jjb/repos/voltha-helm-charts.yaml
+++ b/jjb/repos/voltha-helm-charts.yaml
@@ -38,7 +38,7 @@
name: 'verify-voltha-helm-charts-jobs-master'
jobs:
- 'voltha-patch-test'
-
+
- job-group:
name: 'verify-voltha-helm-charts-jobs-voltha-2.12'
jobs:
@@ -58,5 +58,5 @@
# jobs:
# - 'voltha-patch-test':
# pipeline-script: 'voltha/voltha-2.8/bbsim-tests.groovy'
-
+
# [EOF]
diff --git a/jjb/shell/common/README.md b/jjb/shell/common/README.md
index 07d5e70..82fef33 100644
--- a/jjb/shell/common/README.md
+++ b/jjb/shell/common/README.md
@@ -30,5 +30,3 @@
source common/common.sh
source common/common.sh --tempdir
source common/common.sh --traputils --stacktrace
-
-
diff --git a/jjb/shell/common/common/sh/tempdir.sh b/jjb/shell/common/common/sh/tempdir.sh
index 40d842e..417cb6d 100644
--- a/jjb/shell/common/common/sh/tempdir.sh
+++ b/jjb/shell/common/common/sh/tempdir.sh
@@ -31,13 +31,13 @@
function common_tempdir_mkdir()
{
local var="$1"; shift
-
+
local pkgbase="${0##*/}" # basename
local pkgname="${pkgbase%.*}"
local __junk__
local __junk__="$(mktemp -d -t "${pkgname}.XXXXXXXXXX")"
-
+
__COMMON_TEMP_DIRS__+=("$__junk__")
export TMPDIR="$__junk__"
diff --git a/jjb/shell/common/common/sh/traputils.sh b/jjb/shell/common/common/sh/traputils.sh
index ded5cc7..cf51f8a 100644
--- a/jjb/shell/common/common/sh/traputils.sh
+++ b/jjb/shell/common/common/sh/traputils.sh
@@ -44,18 +44,18 @@
{
local new_trap="$1"; shift
declare -a sigs=($*)
-
+
# local sigs=$*
local sig
for sig in "${sigs[@]}";
do
local stack_name="$(trap_stack_name "$sig")"
local old_trap="$(get_trap "$sig")"
-
+
# eval '__trap_stack_SIGUSR1[${#__trap_stack_SIGUSR1[@]}]=$old_trap'
# __trap_stack_SIGUSR1[${#__trap_stack_SIGUSR1[@]}]=one
# trap two SIGUSR1
-
+
eval "${stack_name}"'[${#'"${stack_name}"'[@]}]=$old_trap'
trap "${new_trap}" "$sig"
done
diff --git a/jjb/shell/common/example.sh b/jjb/shell/common/example.sh
index 0c0e46a..ada12ae 100755
--- a/jjb/shell/common/example.sh
+++ b/jjb/shell/common/example.sh
@@ -54,7 +54,7 @@
# foo: hello - stack_frame[1]
# bar: hello - stack_frame[2]
# tans: early exit for stacktrace
-#
+#
# OFFENDER: ./example.sh:1
# ERROR: 'exit 1' exited with status 1
# Call tree:
diff --git a/jjb/shell/github-release.sh b/jjb/shell/github-release.sh
index fec3872..dddfe0c 100755
--- a/jjb/shell/github-release.sh
+++ b/jjb/shell/github-release.sh
@@ -504,7 +504,7 @@
{
local -n ref=$1; shift
local varpath="$ref"
-
+
DEST_GOPATH=${DEST_GOPATH:-}
if [ -n "$DEST_GOPATH" ]; then
mkdir -p "$GOPATH/src/$DEST_GOPATH"
@@ -939,9 +939,9 @@
## -----------------------------------------------------------------------
function my_gh()
{
- func_echo "ENTER"
+ func_echo "ENTER"
set -x
-
+
declare -a cmd=()
cmd+=("$gh_cmd")
@@ -958,7 +958,7 @@
case "$arg" in
# Modes
- -*debug)
+ -*debug)
# shellcheck disable=SC2034
declare -i -g debug=1
;;
diff --git a/jjb/software-upgrades.yaml b/jjb/software-upgrades.yaml
index acb9e0b..4a83bcc 100644
--- a/jjb/software-upgrades.yaml
+++ b/jjb/software-upgrades.yaml
@@ -98,9 +98,9 @@
onu-image-crc: '0'
time-trigger: "H H/23 * * *"
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------
# https://docs.voltha.org/master/release_notes/voltha_2.11.html#onos-apps
-# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------
- 'software-upgrades-test-voltha-2.11':
name: 'periodic-software-upgrade-test-bbsim-2.11'
pipeline-script: 'voltha/voltha-2.11/software-upgrades.groovy'
diff --git a/jjb/verify/ofagent-go.yaml b/jjb/verify/ofagent-go.yaml
index 164b5de..7cb54e2 100644
--- a/jjb/verify/ofagent-go.yaml
+++ b/jjb/verify/ofagent-go.yaml
@@ -9,7 +9,7 @@
- 'verify-ofagent-go-jobs':
branch-regexp: '{all-branches-regexp}'
- 'verify-ofagent-jobs-master':
- branch-regexp: '^master$'
+ branch-regexp: '^master$'
- 'verify-ofagent-jobs-voltha-2.12':
name-extension: '-voltha-2.12'
override-branch: 'voltha-2.12'
diff --git a/jjb/verify/voltha-go.yaml b/jjb/verify/voltha-go.yaml
index 58fbafa..fbf92db 100644
--- a/jjb/verify/voltha-go.yaml
+++ b/jjb/verify/voltha-go.yaml
@@ -9,7 +9,7 @@
- 'verify-voltha-go-jobs':
branch-regexp: '{all-branches-regexp}'
- 'verify-voltha-go-jobs-master':
- branch-regexp: '^master$'
+ branch-regexp: '^master$'
- 'verify-voltha-go-jobs-voltha-2.12':
name-extension: '-voltha-2.12'
override-branch: 'voltha-2.12'
diff --git a/jjb/verify/voltha-openolt-adapter.yaml b/jjb/verify/voltha-openolt-adapter.yaml
index 6cee045..53b9990 100644
--- a/jjb/verify/voltha-openolt-adapter.yaml
+++ b/jjb/verify/voltha-openolt-adapter.yaml
@@ -47,7 +47,7 @@
jobs:
- 'voltha-patch-test':
extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
-
+
- job-group:
name: 'verify-voltha-openolt-adapter-jobs-voltha-2.12'
jobs:
diff --git a/jjb/voltha-e2e.yaml b/jjb/voltha-e2e.yaml
index 7a1a99d..9938f5c 100755
--- a/jjb/voltha-e2e.yaml
+++ b/jjb/voltha-e2e.yaml
@@ -1751,8 +1751,8 @@
olts: 2
timeout: 180
- # -----------------------------------------------------------------------
- # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
- 'voltha-periodic-test':
name: 'periodic-voltha-test-DMI'
extraHelmFlags: '--set global.image_tag=master --set onos-classic.image.tag=master'
@@ -1803,8 +1803,8 @@
teardown: true
logging: true
- # -----------------------------------------------------------------------
- # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
- 'voltha-periodic-test':
name: 'periodic-voltha-etcd-test'
build-node: 'ubuntu18.04-basebuild-4c-8g'
@@ -1862,8 +1862,8 @@
teardown: true
logging: true
- # -----------------------------------------------------------------------
- # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
- 'voltha-periodic-test':
name: 'periodic-voltha-unitag-subscriber-tt-test-bbsim'
code-branch: 'master'
@@ -1942,8 +1942,8 @@
teardown: true
logging: true
- # -----------------------------------------------------------------------
- # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
- 'voltha-periodic-test':
name: 'periodic-voltha-tt-maclearner-sanity-test-bbsim'
code-branch: 'master'
diff --git a/jjb/voltha-e2e/README b/jjb/voltha-e2e/README
index 8b57f6f..87d01b2 100644
--- a/jjb/voltha-e2e/README
+++ b/jjb/voltha-e2e/README
@@ -4,4 +4,4 @@
git branches are not used, all jobs are visible.
To support modular branch based testing naming conventions that include
some form of voltha-X.YY will be used within configs and templates to
-support separation of jobs by release branch.
\ No newline at end of file
+support separation of jobs by release branch.
diff --git a/jjb/voltha-e2e/master.yaml b/jjb/voltha-e2e/master.yaml
index d29f779..b21e70f 100644
--- a/jjb/voltha-e2e/master.yaml
+++ b/jjb/voltha-e2e/master.yaml
@@ -83,7 +83,7 @@
# ---------------------------------------------------------
# 20230828 - strange, release branches have pipeline-script
# 20230828 - while master branch did not (?) Script does
- # 20230828 - show in the jenkins UI but w/o updates.
+ # 20230828 - show in the jenkins UI but w/o updates.
# ---------------------------------------------------------
pipeline-script: 'voltha/bbsim-tests.groovy'
pipeline-branch: 'master'
diff --git a/jjb/voltha-e2e/voltha-2.12.yaml b/jjb/voltha-e2e/voltha-2.12.yaml
index 28e1771..2e9899d 100644
--- a/jjb/voltha-e2e/voltha-2.12.yaml
+++ b/jjb/voltha-e2e/voltha-2.12.yaml
@@ -194,5 +194,5 @@
flags: ""
teardown: true
logging: true
-
+
# [EOF]
diff --git a/jjb/voltha-test/voltha-nightly-jobs.yaml b/jjb/voltha-test/voltha-nightly-jobs.yaml
index 5abab1b..89d1a4b 100644
--- a/jjb/voltha-test/voltha-nightly-jobs.yaml
+++ b/jjb/voltha-test/voltha-nightly-jobs.yaml
@@ -683,7 +683,7 @@
Post Tests on {config-pod} triggered by build_{config-pod}_{branch}, using {pipeline-script}<br /><br />
Created from job-template {id} from ci-management/jjb/voltha-test/voltha-nightly-jobs.yaml <br />
Created by (Suchitra Vemuri) <br />
- UUID: 798f0064-4058-11ee-b70f-2fee4c7dfce6 <br />
+ UUID: 798f0064-4058-11ee-b70f-2fee4c7dfce6 <br />
Copyright 2017-2024 Open Networking Foundation (ONF) and the ONF Contributors
<<: *voltha-pipe-job-boiler-plate
diff --git a/jjb/voltha-test/voltha.yaml b/jjb/voltha-test/voltha.yaml
index 93cb11a..62b0dfa 100644
--- a/jjb/voltha-test/voltha.yaml
+++ b/jjb/voltha-test/voltha.yaml
@@ -276,7 +276,7 @@
time: '13'
pipeline-script: 'voltha/voltha-2.12/physical-build.groovy'
- # -----------------------------------------------------------------------
+ # -----------------------------------------------------------------------
# Berlin POD test job - 2.11 versions: uses 1T4GEM tech profile on voltha branch
- 'build_voltha_pod_test':
timeout: 330
diff --git a/lf/README.md b/lf/README.md
index a021181..92fe3a5 100644
--- a/lf/README.md
+++ b/lf/README.md
@@ -3,7 +3,7 @@
$(sandbox-root)/include.mk
Source this makefile to import library makefile logic.
-
+
$(sandbox-root)/lf/onf-maker/
$(sandbox-root)/lf/onf-maker/include.mk
repo:onf-make library makefiles
@@ -12,4 +12,3 @@
$(sandbox-root)/lf/local/
$(sandbox-root)/lf/local/include.mk
makefile directory for per-repository targets and logic.
-
diff --git a/makefiles/commands/kail/godownloader.sh b/makefiles/commands/kail/godownloader.sh
index 77ad5bf..ee3fbe4 100755
--- a/makefiles/commands/kail/godownloader.sh
+++ b/makefiles/commands/kail/godownloader.sh
@@ -58,7 +58,7 @@
srcdir="${tmpdir}"
(cd "${tmpdir}" && untar "${TARBALL}")
test ! -d "${BINDIR}" && install -d "${BINDIR}"
-# shellcheck disable=SC2043
+# shellcheck disable=SC2043
for binexe in "kail" ; do
if [ "$OS" = "windows" ]; then
binexe="${binexe}.exe"
diff --git a/makefiles/docker/config/voltha-openolt-adapter.mk b/makefiles/docker/config/voltha-openolt-adapter.mk
index 98ed2c3..ffbfe1c 100644
--- a/makefiles/docker/config/voltha-openolt-adapter.mk
+++ b/makefiles/docker/config/voltha-openolt-adapter.mk
@@ -22,4 +22,3 @@
# voltha-protos-v5 := /go/src/github.com/opencord/voltha-protos/v5
# [EOF]
-
diff --git a/makefiles/gerrit/include.mk b/makefiles/gerrit/include.mk
index 1c5ad2c..614ab79 100644
--- a/makefiles/gerrit/include.mk
+++ b/makefiles/gerrit/include.mk
@@ -27,7 +27,7 @@
# -----------------------------------------------------------------------
# NOTE: Gerrit ssh targets assume use of ~/.ssh config files
-# port, login, etc are
+# port, login, etc are
# -----------------------------------------------------------------------
# % ssh -p 29418 <username>@gerrit.opencord.org replication list --detail
# % ssh gerrit.opencord.org replication list --detail
diff --git a/makefiles/jjb/include.mk b/makefiles/jjb/include.mk
index 5ada55a..5746d2d 100644
--- a/makefiles/jjb/include.mk
+++ b/makefiles/jjb/include.mk
@@ -32,5 +32,3 @@
endif
# [EOF]
-
-
diff --git a/makefiles/lint/groovy/install.mk b/makefiles/lint/groovy/install.mk
index 8449b74..13830bf 100644
--- a/makefiles/lint/groovy/install.mk
+++ b/makefiles/lint/groovy/install.mk
@@ -46,4 +46,3 @@
@echo ' lint-groovy-install Syntax check groovy sources'
# [EOF]
-
diff --git a/makefiles/lint/jjb.mk b/makefiles/lint/jjb.mk
index 9565363..cfc5eba 100644
--- a/makefiles/lint/jjb.mk
+++ b/makefiles/lint/jjb.mk
@@ -44,7 +44,7 @@
lint-jjb-args += jjb/# # JJB config sources (input)
lint-jjb-deps := $(null)
-lint-jjb-deps += $(venv-activate-script)
+lint-jjb-deps += $(venv-activate-script)
lint-jjb-deps += checkout-ci-management-sub-modules
lint-jjb: $(lint-jjb-deps)
$(activate) && { jenkins-jobs $(lint-jjb-args); }
diff --git a/makefiles/lint/json.mk b/makefiles/lint/json.mk
index 4c63f88..9d0088f 100644
--- a/makefiles/lint/json.mk
+++ b/makefiles/lint/json.mk
@@ -43,7 +43,7 @@
## -----------------------------------------------------------------------
json-find-args := $(null)
json-find-args += -name '$(venv-name)'
-lint-json-all:
+lint-json-all:
$(HIDE)$(MAKE) --no-print-directory lint-json-install
$(activate)\
diff --git a/makefiles/lint/yaml/.yamllint b/makefiles/lint/yaml/.yamllint
index 8252511..db8c14d 100644
--- a/makefiles/lint/yaml/.yamllint
+++ b/makefiles/lint/yaml/.yamllint
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2022-2024 Open Networking Foundation (ONF) Contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,10 +13,11 @@
# 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.
-#
-# SPDX-FileCopyrightText: 2024 Open Networking Foundation (ONF) and the ONF Contributors
+# -----------------------------------------------------------------------
+# SPDX-FileCopyrightText: 2024 Open Networking Foundation Contributors
# SPDX-License-Identifier: Apache-2.0
# -----------------------------------------------------------------------
+
---
yaml-files:
@@ -30,7 +31,8 @@
max: 160
# -----------------------------------------------------------------------
-# .. seealso: https://gerrit.opencord.org/plugins/gitiles/helm-repo-tools/+/refs/heads/master/yamllint.conf
+# .. seealso: https://gerrit.opencord.org/plugins/gitiles/
+# helm-repo-tools/+/refs/heads/master/yamllint.conf
# -----------------------------------------------------------------------
#
# extends: default
@@ -43,3 +45,4 @@
# braces:
# min-spaces-inside: 0
# max-spaces-inside: 1
+# -----------------------------------------------------------------------
diff --git a/makefiles/lint/yaml/byrepo/ci-management/yamllint.conf b/makefiles/lint/yaml/byrepo/ci-management/yamllint.conf
index 32d76ab..b821cb8 100644
--- a/makefiles/lint/yaml/byrepo/ci-management/yamllint.conf
+++ b/makefiles/lint/yaml/byrepo/ci-management/yamllint.conf
@@ -5,4 +5,3 @@
max-end: 1
line-length:
max: 120
-
diff --git a/makefiles/lint/yaml/byrepo/voltha-lib-go/repo b/makefiles/lint/yaml/byrepo/voltha-lib-go/repo
index 99e8451..7011a2c 100644
--- a/makefiles/lint/yaml/byrepo/voltha-lib-go/repo
+++ b/makefiles/lint/yaml/byrepo/voltha-lib-go/repo
@@ -1 +1 @@
-Source from voltha-lib-go
\ No newline at end of file
+Source from voltha-lib-go
diff --git a/makefiles/lint/yaml/byrepo/voltha-lib-go/urls b/makefiles/lint/yaml/byrepo/voltha-lib-go/urls
index 8747658..7609256 100644
--- a/makefiles/lint/yaml/byrepo/voltha-lib-go/urls
+++ b/makefiles/lint/yaml/byrepo/voltha-lib-go/urls
@@ -2,4 +2,4 @@
https://yamllint.readthedocs.io/en/stable/configuration.html
-# [EOF]
\ No newline at end of file
+# [EOF]
diff --git a/makefiles/release/include.mk b/makefiles/release/include.mk
index 6c56261..0e2ae31 100644
--- a/makefiles/release/include.mk
+++ b/makefiles/release/include.mk
@@ -32,5 +32,3 @@
endif
# [EOF]
-
-
diff --git a/makefiles/release/voltha-versions.mk b/makefiles/release/voltha-versions.mk
index b8977dc..6bc7874 100644
--- a/makefiles/release/voltha-versions.mk
+++ b/makefiles/release/voltha-versions.mk
@@ -36,7 +36,7 @@
# fatal to make help (param is null)
voltha-version ?= $(error $(MAKE) voltha-verison=voltha-x.yy is required)\
-voltha-release-this := $(word 1,$(voltha-versions))
+voltha-release-this := $(word 1,$(voltha-versions))
voltha-release-last := $(word 2,$(voltha-versions))
$(if $(DEBUG),$(warning LEAVE))
diff --git a/requirements.txt b/requirements.txt
index 7b561ae..957764d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -7,6 +7,7 @@
jenkins-jobs
bashate
+pre-commit
# Installed on-demand by makefiles/lint/python/{flake8,pylint,tox}.mk
# pylint
diff --git a/test/bats/check_repo_tags.bats b/test/bats/check_repo_tags.bats
index 64dd88a..6470393 100755
--- a/test/bats/check_repo_tags.bats
+++ b/test/bats/check_repo_tags.bats
@@ -75,7 +75,7 @@
fi
[[ ! -v enable_fatal ]] && { continue; }
;;
- voltha-openolt-adapter)
+ voltha-openolt-adapter)
if [[ -v enable_skip ]]; then
skip 'declare -a gerrit=([0]="4.4.10")'
fi
@@ -109,7 +109,7 @@
## Check for deltas
[[ "${gerrit[*]}" == "${github[@]}" ]]
done
-
+
## -----------------------------------------
## Compare by size, filtered list is smaller
## -----------------------------------------
@@ -120,7 +120,7 @@
## Intent: Compare tags between gerrit and github repositories
## -----------------------------------------------------------------------
@test 'Validate comp_test_tag()' {
-
+
local component
for component in "${components[@]}";
do
diff --git a/test/bats/conf/repos/README.md b/test/bats/conf/repos/README.md
index d28f5d9..a3719d0 100644
--- a/test/bats/conf/repos/README.md
+++ b/test/bats/conf/repos/README.md
@@ -8,4 +8,3 @@
o Consider creating a common test data repository for content.
o Consider creating a library function able to gather repository names.
- On github traversal of orgs by name may work but is performance an issue ?
-
diff --git a/vars/getVolthaCode.groovy b/vars/getVolthaCode.groovy
index 23b373d..aecb30d 100644
--- a/vars/getVolthaCode.groovy
+++ b/vars/getVolthaCode.groovy
@@ -188,7 +188,7 @@
sh """
cd "$WORKSPACE/voltha-helm-charts"
git fetch "$repo_vhc" ${cfg.volthaHelmChartsChange} && git checkout FETCH_HEAD
- """
+ """
leave("git fetch repo_vhc=[$repo_vhc]")
}
else if (cfg.gerritProject == 'voltha-helm-charts') {
diff --git a/vars/pgrep_proc.groovy b/vars/pgrep_proc.groovy
index 726bccc..75a3600 100644
--- a/vars/pgrep_proc.groovy
+++ b/vars/pgrep_proc.groovy
@@ -72,13 +72,13 @@
Boolean ans = true
throw new Exception("UNUSED: Not yet implemented")
-
+
println("** ${iam}: ENTER")
// var = Gstring throws exception due to cast problem.
// var = [ 'foo', 'bar' 'tans' ].join(' ').toString() fails
throw new Exception("Not yet implemented")
-
+
try {
process(proc, args)
}
diff --git a/vars/pkill_proc.groovy b/vars/pkill_proc.groovy
index c265a83..b77921e 100644
--- a/vars/pkill_proc.groovy
+++ b/vars/pkill_proc.groovy
@@ -79,7 +79,7 @@
// Groovy, why special case list comma handling (?)
Boolean filler = true // groovylint-disable-line UnusedMethodParameter
) {
-
+
String iam = getIam('main')
Boolean ans = true
diff --git a/vars/waitForAdapters.groovy b/vars/waitForAdapters.groovy
index e6a9a17..3cc56e3 100644
--- a/vars/waitForAdapters.groovy
+++ b/vars/waitForAdapters.groovy
@@ -148,7 +148,7 @@
: 'CONTINUE'
}
-
+
if (debug) {
leave("return: [$ans]")
}
diff --git a/yamllint.conf b/yamllint.conf
index 32d76ab..b821cb8 100644
--- a/yamllint.conf
+++ b/yamllint.conf
@@ -5,4 +5,3 @@
max-end: 1
line-length:
max: 120
-