[VOL-5031] Build and deploy voltha-onos for v2.12
makefiles/*
-----------
o https://github.com/opencord/onf-make
o Update to the latest library makefiles to support more lint targets.
VERSION
-------
o Cosmetic dev version bump to triage build state.
Change-Id: Iaddd825c24afdfa13e99cfd46cfe887072016d0f
diff --git a/makefiles/lint/groovy.mk b/makefiles/lint/groovy.mk
new file mode 100644
index 0000000..6baf70c
--- /dev/null
+++ b/makefiles/lint/groovy.mk
@@ -0,0 +1,51 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
+# -----------------------------------------------------------------------
+
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+
+groovy-check := npm-groovy-lint
+
+groovy-check-args := $(null)
+# groovy-check-args += --loglevel info
+# groovy-check-args += --ignorepattern
+# groovy-check-args += --verbose
+
+##-------------------##
+##---] TARGETS [---##
+##-------------------##
+ifndef NO-LINT-GROOVY
+ lint : lint-groovy
+endif
+
+## -----------------------------------------------------------------------
+## Intent: Perform a lint check on command line script sources
+## -----------------------------------------------------------------------
+lint-groovy:
+ $(groovy-check) --version
+ @echo
+ $(HIDE)$(env-clean) find . -iname '*.groovy' -print0 \
+ | $(xargs-n1) $(groovy-check) $(groovy-check-args)
+
+## -----------------------------------------------------------------------
+## Intent: Display command help
+## -----------------------------------------------------------------------
+help-summary ::
+ @echo ' lint-groovy Syntax check groovy sources'
+
+# [EOF]
diff --git a/makefiles/lint/groovy/README.md b/makefiles/lint/groovy/README.md
new file mode 100644
index 0000000..aa9b41a
--- /dev/null
+++ b/makefiles/lint/groovy/README.md
@@ -0,0 +1,13 @@
+# lint: groovy source
+
+# Invoke the linting tool
+% make lint-groovy
+
+# Alt checking: groovy interpreter
+
+Odd syntax errors can be detected by the groovy interpreter.
+
+% groovy path/to/{source}.groovy
+
+jjb/ pipeline scripts will eventually due to syntax problems but groovy can
+still detect problems like mismatched quotes, invalid op tokens, etc.
diff --git a/makefiles/lint/groovy/urls b/makefiles/lint/groovy/urls
new file mode 100644
index 0000000..aa5c5eb
--- /dev/null
+++ b/makefiles/lint/groovy/urls
@@ -0,0 +1,8 @@
+# -*- makefile -*-
+
+# Config file and exclusions
+https://www.npmjs.com/package/npm-groovy-lint#Configuration
+
+https://github.com/nvuillam/npm-groovy-lint
+
+# [EOF]
diff --git a/makefiles/lint/yaml/yamllint.helm b/makefiles/lint/help.mk
similarity index 61%
rename from makefiles/lint/yaml/yamllint.helm
rename to makefiles/lint/help.mk
index 6c7787b..24a5aa1 100644
--- a/makefiles/lint/yaml/yamllint.helm
+++ b/makefiles/lint/help.mk
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2021-2023 Open Networking Foundation (ONF) and the 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,20 +13,19 @@
# 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: 2022 Open Networking Foundation (ONF) and the ONF Contributors
-# SPDX-License-Identifier: Apache-2.0
# -----------------------------------------------------------------------
----
-# yamllint.conf
-extends: default
+help ::
-rules:
- empty-lines:
- max-end: 1
- line-length:
- max: 120
- braces:
- min-spaces-inside: 0
- max-spaces-inside: 1
+# -----------------------------------------------------------------------
+# -----------------------------------------------------------------------
+help-summary ::
+ @echo ' help-lint Display lint target help'
+
+help-simple :: help-lint
+help-lint :
+ @echo
+ @echo "[LINT]"
+ @echo ' help-lint Display lint target help'
+
+# [EOF]
diff --git a/makefiles/lint/include.mk b/makefiles/lint/include.mk
index 2a2d9ab..95059fe 100644
--- a/makefiles/lint/include.mk
+++ b/makefiles/lint/include.mk
@@ -2,6 +2,9 @@
# -----------------------------------------------------------------------
# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
# -----------------------------------------------------------------------
+# https://gerrit.opencord.org/plugins/gitiles/onf-make
+# ONF.makefile.version = 1.1
+# -----------------------------------------------------------------------
$(if $(DEBUG),$(warning ENTER))
@@ -9,15 +12,16 @@
@echo
@echo "[LINT]"
-include $(ONF_MAKE)/lint/makefile.mk
-include $(ONF_MAKE)/lint/python.mk
-include $(ONF_MAKE)/lint/shell.mk
+include $(ONF_MAKEDIR)/lint/groovy.mk
+include $(ONF_MAKEDIR)/lint/jjb.mk
+include $(ONF_MAKEDIR)/lint/json.mk
+include $(ONF_MAKEDIR)/lint/license/include.mk
+include $(ONF_MAKEDIR)/lint/makefile.mk
+include $(ONF_MAKEDIR)/lint/python.mk
+include $(ONF_MAKEDIR)/lint/shell.mk
+include $(ONF_MAKEDIR)/lint/yaml.mk
-ifdef YAML_FILES
- include $(ONF_MAKE)/lint/yaml/python.mk
-else
- include $(ONF_MAKE)/lint/yaml/yamllint.mk
-endif
+include $(ONF_MAKEDIR)/lint/help.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/jjb.mk b/makefiles/lint/jjb.mk
new file mode 100644
index 0000000..ccfa073
--- /dev/null
+++ b/makefiles/lint/jjb.mk
@@ -0,0 +1,60 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
+# -----------------------------------------------------------------------
+
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+.PHONY: lint-venv
+
+##-------------------##
+##---] TARGETS [---##
+##-------------------##
+ifndef NO-LINT-JJB
+ lint : lint-jjb
+endif
+
+## -----------------------------------------------------------------------
+## Intent: Construct command line for linting jenkins-job-builder config
+## -----------------------------------------------------------------------
+
+ifdef DEBUG
+ lint-jjb-args += --log_level DEBUG# # verbosity: high
+else
+ lint-jjb-args += --log_level INFO# # verbosity: default
+endif
+lint-jjb-args += --ignore-cache
+lint-jjb-args += test# # command action
+lint-jjb-args += -o archives/job-configs# # Generated jobs written here
+lint-jjb-args += --recursive
+lint-jjb-args += --config-xml# # JJB v3.0 write to OUTPUT/jobname/config.xml
+lint-jjb-args += jjb/# # JJB config sources (input)
+
+lint-jjb-deps := $(null)
+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); }
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+help ::
+ @echo ' lint-jjb Validate jjb job generation'
+ifdef VERBOSE
+ @echo ' DEBUG=1 lint-jjb --log_level=DEBUG'
+endif
+
+# [EOF]
diff --git a/makefiles/lint/json.mk b/makefiles/lint/json.mk
new file mode 100644
index 0000000..1deeaba
--- /dev/null
+++ b/makefiles/lint/json.mk
@@ -0,0 +1,92 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
+# -----------------------------------------------------------------------
+
+$(if $(DEBUG),$(warning ENTER))
+
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+.PHONY: lint-json lint-json-all lint-json-modified
+
+have-json-files := $(if $(strip $(JSON_FILES)),true)
+JSON_FILES ?= $(error JSON_FILES= required)
+
+## -----------------------------------------------------------------------
+## Intent: Use the json command to perform syntax checking.
+## o If UNSTABLE=1 syntax check all sources
+## o else only check sources modified by the developer.
+## Usage:
+## % make lint UNSTABLE=1
+## % make lint-json-all
+## -----------------------------------------------------------------------
+ifndef NO-LINT-JSON
+ lint-json-mode := $(if $(have-json-files),modified,all)
+ lint : lint-json-$(lint-json-mode)
+endif# NO-LINT-JSON
+
+## -----------------------------------------------------------------------
+## Intent: exhaustive json syntax checking
+## -----------------------------------------------------------------------
+json-find-args := $(null)
+json-find-args += -name '$(venv-name)'
+lint-json-all:
+ $(HIDE)$(MAKE) --no-print-directory lint-json-install
+
+ $(activate)\
+ && find . \( $(json-find-args) \) -prune -o -name '*.json' -print0 \
+ | $(xargs-n1) python -m json.tool > /dev/null ;\
+
+## -----------------------------------------------------------------------
+## Intent: check deps for format and python3 cleanliness
+## Note:
+## json --py3k option no longer supported
+## -----------------------------------------------------------------------
+lint-json-modified: $(venv-activate-script)
+ $(HIDE)$(MAKE) --no-print-directory lint-json-install
+
+ $(activate)\
+ && for jsonfile in $(JSON_FILES); do \
+ echo "Validating json file: $$jsonfile" ;\
+ python -m json.tool $$jsonfile > /dev/null ;\
+ done
+
+## -----------------------------------------------------------------------
+## Intent:
+## -----------------------------------------------------------------------
+.PHONY: lint-json-install
+lint-json-install: $(venv-activate-script)
+ @echo
+ @echo "** -----------------------------------------------------------------------"
+ @echo "** json syntax checking"
+ @echo "** -----------------------------------------------------------------------"
+# $(activate) && pip install --upgrade json.tool
+# $(activate) && python -m json.tool --version (?-howto-?)
+ @echo
+
+## -----------------------------------------------------------------------
+## Intent: Display command usage
+## -----------------------------------------------------------------------
+help::
+ @echo ' lint-json Syntax check python using the json command'
+ ifdef VERBOSE
+ @echo ' lint-json-all json checking: exhaustive'
+ @echo ' lint-json-modified json checking: only modified'
+ endif
+
+$(if $(DEBUG),$(warning LEAVE))
+
+# [EOF]
diff --git a/makefiles/lint/license/include.mk b/makefiles/lint/license/include.mk
new file mode 100644
index 0000000..2b42049
--- /dev/null
+++ b/makefiles/lint/license/include.mk
@@ -0,0 +1,41 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
+# -----------------------------------------------------------------------
+
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+
+##-------------------##
+##---] TARGETS [---##
+##-------------------##
+ifndef NO-LINT-REUSE
+ lint : lint-license
+endif
+
+## -----------------------------------------------------------------------
+## Intent: Perform a lint check on makefile sources
+## -----------------------------------------------------------------------
+lint-license:
+ reuse --root . lint
+
+## -----------------------------------------------------------------------
+## Intent: Display command help
+## -----------------------------------------------------------------------
+help-summary ::
+ @echo ' lint-reuse License syntax checking'
+
+# [EOF]
diff --git a/makefiles/lint/license/reuse.mk b/makefiles/lint/license/reuse.mk
new file mode 100644
index 0000000..5572bef
--- /dev/null
+++ b/makefiles/lint/license/reuse.mk
@@ -0,0 +1,41 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
+# -----------------------------------------------------------------------
+
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+
+##-------------------##
+##---] TARGETS [---##
+##-------------------##
+ifndef NO-LINT-REUSE
+ lint : lint-license
+endif
+
+## -----------------------------------------------------------------------
+## Intent: Perform a lint check on makefile sources
+## -----------------------------------------------------------------------
+lint-license:
+ reuse --root . lint
+
+## -----------------------------------------------------------------------
+## Intent: Display command help
+## -----------------------------------------------------------------------
+help-summary ::
+ @echo ' lint-reuse License syntax checking"
+
+# [EOF]
diff --git a/makefiles/lint/makefile.mk b/makefiles/lint/makefile.mk
index 522d027..27206e0 100644
--- a/makefiles/lint/makefile.mk
+++ b/makefiles/lint/makefile.mk
@@ -1,6 +1,18 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
# -----------------------------------------------------------------------
##-------------------##
@@ -14,7 +26,8 @@
make-check-find += -o \( -iname makefile -o -name '*.mk' \)
make-check-find += -type f -print0
-make-check := $(env-clean) $(MAKE)
+make-check := $(MAKE)
+
make-check-args += --dry-run
make-check-args += --keep-going
make-check-args += --warn-undefined-variables
@@ -31,14 +44,22 @@
endif
## -----------------------------------------------------------------------
+## Intent: Perform a lint check on makefile sources
## -----------------------------------------------------------------------
+lint-make-ignore += JSON_FILES=
+lint-make-ignore += YAML_FILES=
lint-make:
+ @echo
+ @echo "** -----------------------------------------------------------------------"
+ @echo "** Makefile syntax checking"
+ @echo "** -----------------------------------------------------------------------"
$(HIDE)$(env-clean) $(make-check-find) \
- | $(xargs-n1-local) $(make-check) $(make-check-args)
+ | $(xargs-n1-local) $(make-check) $(make-check-args) $(lint-make-ignore)
## -----------------------------------------------------------------------
+## Intent: Display command help
## -----------------------------------------------------------------------
-help ::
- @echo ' lint-make Syntax check [Mm]akefile and *.mk'
+help-summary ::
+ @echo ' lint-make Syntax check [Mm]akefile and *.mk'
# [EOF]
diff --git a/makefiles/lint/python.mk b/makefiles/lint/python.mk
index 9252657..d3fe4fd 100644
--- a/makefiles/lint/python.mk
+++ b/makefiles/lint/python.mk
@@ -1,6 +1,18 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
# -----------------------------------------------------------------------
##-------------------##
@@ -26,14 +38,16 @@
endif
## -----------------------------------------------------------------------
+## Intent: Perform a lint check on makefile sources
## -----------------------------------------------------------------------
lint-python:
$(HIDE)$(env-clean) $(python-check-find) \
| $(xargs-n1) $(python-check) $(python-check-args)
## -----------------------------------------------------------------------
+## Intent: Display command help
## -----------------------------------------------------------------------
-help ::
- @echo ' lint-python Syntax check python sources'
+help-summary ::
+ @echo ' lint-python Syntax check python sources (*.py)'
# [EOF]
diff --git a/makefiles/lint/robot.mk b/makefiles/lint/robot.mk
new file mode 100644
index 0000000..f33c4ba
--- /dev/null
+++ b/makefiles/lint/robot.mk
@@ -0,0 +1,43 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2017-2023 Open Networking Foundation
+#
+# 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.
+# -----------------------------------------------------------------------
+
+ROBOT_FILES ?= $(error ROBOT_FILES= is required)
+
+LINT_ARGS ?= --verbose --configure LineTooLong:130 -e LineTooLong \
+ --configure TooManyTestSteps:65 -e TooManyTestSteps \
+ --configure TooManyTestCases:50 -e TooManyTestCases \
+ --configure TooFewTestSteps:1 \
+ --configure TooFewKeywordSteps:1 \
+ --configure FileTooLong:2000 -e FileTooLong \
+ -e TrailingWhitespace
+
+
+.PHONY: lint-robot
+
+ifndef NO-LINT-ROBOT
+ lint : lint-robot
+endif
+
+lint-robot: vst_venv
+ source ./$</bin/activate \
+ ; set -u \
+ ; rflint $(LINT_ARGS) $(ROBOT_FILES)
+
+help::
+ @echo " lint-robot Syntax check robot sources using rflint"
+
+# [EOF]
diff --git a/makefiles/lint/shell.mk b/makefiles/lint/shell.mk
index cadc084..704038c 100644
--- a/makefiles/lint/shell.mk
+++ b/makefiles/lint/shell.mk
@@ -1,6 +1,21 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
+# -----------------------------------------------------------------------
+# https://gerrit.opencord.org/plugins/gitiles/onf-make
+# ONF.makefile.version = 1.0
# -----------------------------------------------------------------------
##-------------------##
@@ -18,7 +33,8 @@
# shell-check := $(env-clean) pylint
shell-check := shellcheck
-shell-check-args += -a
+shell-check-args += --check-sourced
+shell-check-args += --external-sources
##-------------------##
##---] TARGETS [---##
@@ -28,6 +44,7 @@
endif
## -----------------------------------------------------------------------
+## Intent: Perform a lint check on command line script sources
## -----------------------------------------------------------------------
lint-shell:
$(shell-check) -V
@@ -36,8 +53,13 @@
| $(xargs-n1) $(shell-check) $(shell-check-args)
## -----------------------------------------------------------------------
+## Intent: Display command help
## -----------------------------------------------------------------------
-help ::
- @echo ' lint-shell Syntax check shell sources'
+help-summary ::
+ @echo ' lint-shell Syntax check shell sources'
+
+# [SEE ALSO]
+# -----------------------------------------------------------------------
+# o https://www.shellcheck.net/wiki/Directive
# [EOF]
diff --git a/makefiles/lint/urls b/makefiles/lint/urls
new file mode 100644
index 0000000..5694a1b
--- /dev/null
+++ b/makefiles/lint/urls
@@ -0,0 +1,5 @@
+# -*- makefile -*-
+
+https://www.shellcheck.net/wiki/Directive
+
+# [EOF]
\ No newline at end of file
diff --git a/makefiles/lint/yaml.mk b/makefiles/lint/yaml.mk
new file mode 100644
index 0000000..ab5b9d6
--- /dev/null
+++ b/makefiles/lint/yaml.mk
@@ -0,0 +1,84 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2017-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
+# -----------------------------------------------------------------------
+
+$(if $(DEBUG),$(warning ENTER))
+
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+.PHONY: lint-yaml lint-yaml-all lint-yaml-modified
+
+have-yaml-files := $(if $(strip $(YAML_FILES)),true)
+YAML_FILES ?= $(error YAML_FILES= is required)
+
+## -----------------------------------------------------------------------
+## Intent: Use the yaml command to perform syntax checking.
+## o If UNSTABLE=1 syntax check all sources
+## o else only check sources modified by the developer.
+## Usage:
+## % make lint UNSTABLE=1
+## % make lint-yaml-all
+## -----------------------------------------------------------------------
+lint-yaml-mode := $(if $(have-yaml-files),modified,all)
+lint-yaml : lint-yaml-$(lint-yaml-mode)
+
+ifndef NO-LINT-YAML
+ lint : lint-yaml# # Enable as a default lint target
+endif# NO-LINT-YAML
+
+## -----------------------------------------------------------------------
+## Intent: exhaustive yaml syntax checking
+## -----------------------------------------------------------------------
+lint-yaml-all:
+ $(HIDE)$(MAKE) --no-print-directory lint-yaml-install
+
+ find . \( -iname '*.yaml' -o -iname '*.yml' \) -print0 \
+ | $(xargs-n1-clean) yamllint --strict
+
+## -----------------------------------------------------------------------
+## Intent: check deps for format and python3 cleanliness
+## Note:
+## yaml --py3k option no longer supported
+## -----------------------------------------------------------------------
+lint-yaml-modified:
+ $(HIDE)$(MAKE) --no-print-directory lint-yaml-install
+ yamllint -s $(YAML_FILES)
+
+## -----------------------------------------------------------------------
+## Intent:
+## -----------------------------------------------------------------------
+lint-yaml-install:
+ @echo
+ @echo "** -----------------------------------------------------------------------"
+ @echo "** yaml syntax checking"
+ @echo "** -----------------------------------------------------------------------"
+ yamllint --version
+ @echo
+
+## -----------------------------------------------------------------------
+## Intent: Display command usage
+## -----------------------------------------------------------------------
+help::
+ @echo ' lint-yaml Syntax check python using the yaml command'
+ ifdef VERBOSE
+ @echo ' lint-yaml-all yaml checking: exhaustive'
+ @echo ' lint-yaml-modified yaml checking: only locally modified'
+ endif
+
+$(if $(DEBUG),$(warning LEAVE))
+
+# [EOF]
diff --git a/makefiles/lint/yaml/.yamllint b/makefiles/lint/yaml/.yamllint
deleted file mode 100644
index 6a4fc1e..0000000
--- a/makefiles/lint/yaml/.yamllint
+++ /dev/null
@@ -1,45 +0,0 @@
-# -*- makefile -*-
-# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
-#
-# 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.
-#
-# SPDX-FileCopyrightText: 2022 Open Networking Foundation (ONF) and the ONF Contributors
-# SPDX-License-Identifier: Apache-2.0
-# -----------------------------------------------------------------------
----
-
-yaml-files:
- - '*.yaml'
- - '*.yml'
- - '.yamllint'
-
-rules:
- document-start: disable
- line-length:
- max: 160
-
-# -----------------------------------------------------------------------
-# .. seealso: https://gerrit.opencord.org/plugins/gitiles/helm-repo-tools/+/refs/heads/master/yamllint.conf
-# -----------------------------------------------------------------------
-#
-# extends: default
-#
-#rules:
-# empty-lines:
-# max-end: 1
-# line-length:
-# max: 120
-# braces:
-# min-spaces-inside: 0
-# max-spaces-inside: 1
diff --git a/makefiles/lint/yaml/python.mk b/makefiles/lint/yaml/python.mk
deleted file mode 100644
index 868d9b7..0000000
--- a/makefiles/lint/yaml/python.mk
+++ /dev/null
@@ -1,41 +0,0 @@
-# -*- makefile -*-
-# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
-#
-# 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.
-#
-# SPDX-FileCopyrightText: 2022 Open Networking Foundation (ONF) and the ONF Contributors
-# SPDX-License-Identifier: Apache-2.0
-# -----------------------------------------------------------------------
-
-YAML_FILES ?= $(error YAML_FILES= is required)
-
-lint-yaml-dep = $(addsuffix ^lint-yaml,$(YAML_FILES))
-lint-yaml-src = $(firstword $(subst ^,$(space),$(1)))
-
-##-------------------##
-##---] TARGETS [---##
-##-------------------##
-.PHONY : lint-yaml
-lint : lint-yaml
-
-lint-yaml: $(venv-activate)
-lint-yaml: $(lint-yaml-dep)
-
-$(lint-yaml-dep):
- $(vst-env) && yamllint -s $(call lint-yaml-src,$@)
-
-help::
- @echo " lint-yaml Syntax check yaml sources"
-
-# [EOF]
diff --git a/makefiles/lint/yaml/todo b/makefiles/lint/yaml/todo
deleted file mode 100644
index 8a9367b..0000000
--- a/makefiles/lint/yaml/todo
+++ /dev/null
@@ -1,39 +0,0 @@
-# -*- makefile -*-
-# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
-# -----------------------------------------------------------------------
-
-##-------------------##
-##---] GLOBALS [---##
-##-------------------##
-env-clean = /usr/bin/env --ignore-environment
-xargs-n1 := xargs -0 -t -n1 --no-run-if-empty
-
-yamllint := $(env-clean) $(YAMLLINT)
-yamllint-args := -c .yamllint
-
-##-------------------##
-##---] TARGETS [---##
-##-------------------##
-lint : lint-yaml
-
-## -----------------------------------------------------------------------
-## -----------------------------------------------------------------------
-lint-yaml:
- $(HIDE)$(env-clean) find . -name '*.yaml' -type f -print0 \
- | $(xargs-n1) $(yamllint) $(yamllint-args)
-
-## -----------------------------------------------------------------------
-## -----------------------------------------------------------------------
-help:
- @echo
- @echo "USAGE: $(MAKE)"
- @echo " lint perform syntax checks on source"
- @echo " test perform syntax checks on source"
- @echo " pre-check Verify tools and deps are available for testing"
- @echo
- @echo "[LINT]"
- @echo " lint-json Syntax check .json sources"
- @echo " lint-yaml Syntax check .yaml sources"
- @echo
-# [EOF]
diff --git a/makefiles/lint/yaml/urls b/makefiles/lint/yaml/urls
deleted file mode 100644
index 8747658..0000000
--- a/makefiles/lint/yaml/urls
+++ /dev/null
@@ -1,5 +0,0 @@
-# -*- makefile -*-
-
-https://yamllint.readthedocs.io/en/stable/configuration.html
-
-# [EOF]
\ No newline at end of file
diff --git a/makefiles/lint/yaml/yamllint.mk b/makefiles/lint/yaml/yamllint.mk
deleted file mode 100644
index 9556a45..0000000
--- a/makefiles/lint/yaml/yamllint.mk
+++ /dev/null
@@ -1,53 +0,0 @@
-# -*- makefile -*-
-# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation (ONF) and the ONF Contributors
-#
-# 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.
-#
-# SPDX-FileCopyrightText: 2022 Open Networking Foundation (ONF) and the ONF Contributors
-# SPDX-License-Identifier: Apache-2.0
-# -----------------------------------------------------------------------
-
-$(if $(DEBUG),$(warning ENTER))
-
-yamllint := $(env-clean) yamllint
-
-## -------------------------------
-## Add requirement(s) for checking
-## -------------------------------
-# yamllint-cfg := .yamllint
-yamllint-cfg := yamllint.helm
-yamllint-conf = $(wildcard $(yamllint-cfg) $(MAKEDIR)/lint/yaml/$(yamllint-cfg))
-yamllint-args += $(addprefix --config-file$(space),$(yamllint-conf))
-
-# yamllint-args := --no-warnings
-# yamllint-args := --strict
-
-yamllint-find := find . -name 'vendor' -prune
-yamllint-find += -o -name '*.yaml' -type f
-yamllint-find += -print0
-
-## -----------------------------------------------------------------------
-## -----------------------------------------------------------------------
-lint lint-yaml:
- $(HIDE)$(env-clean) $(yamllint-find) \
- | xargs -0 --no-run-if-empty -t -n1 $(yamllint) $(yamllint-args)
-
-## -----------------------------------------------------------------------
-## -----------------------------------------------------------------------
-help::
- @echo " lint-yaml Syntax check yaml sources"
-
-$(if $(DEBUG),$(warning ENTER))
-
-# [EOF]