Updates for the pre-commit hook
.pre-commit-config.yaml
-----------------------
o Add more hooks
bin/setup.sh
makefiles/commands/kail/godownloader.sh
---------------------------------------
o Shellcheck cleanups
install/README.md
-----------------
o Add a project copyright notice.
makefiles/.../*.mk
------------------
o Update copyright notice.
o Replace legacy var $(ONF_MAKEDIR) with onf-mk-dir=
makefiles/virtualenv/include.mk
-------------------------------
o Fixed a small problem with targets clean & sterile.
o Clean target should remove
Change-Id: If624531f4d38aaacc200d3c49aee2c3804122ffb
Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
diff --git a/makefiles/lint/doc8/doc8.mk b/makefiles/lint/doc8/doc8.mk
index 4baf09f..b179b52 100644
--- a/makefiles/lint/doc8/doc8.mk
+++ b/makefiles/lint/doc8/doc8.mk
@@ -38,7 +38,7 @@
# doc8 config as command line args so local makefiles to use --config
# -----------------------------------------------------------------------
ifdef USE_DOC8_INI
- lint-doc8-args += --config $(ONF_MAKEDIR)/lint/doc8/doc8.ini
+ lint-doc8-args += --config $(onf-mk-dir)/lint/doc8/doc8.ini
endif
## -----------------------------------------------------------------------
diff --git a/makefiles/lint/golang/include.mk b/makefiles/lint/golang/include.mk
index f5f363d..c317651 100644
--- a/makefiles/lint/golang/include.mk
+++ b/makefiles/lint/golang/include.mk
@@ -20,7 +20,7 @@
$(if $(DEBUG),$(warning ENTER))
-include $(ONF_MAKEDIR)/lint/golang/sca.mk
+include $(onf-mk-dir)/lint/golang/sca.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/include.mk b/makefiles/lint/include.mk
index 3c9a062..ca0c7df 100644
--- a/makefiles/lint/include.mk
+++ b/makefiles/lint/include.mk
@@ -30,18 +30,18 @@
NO-LINT-PYLINT := true
endif
-include $(ONF_MAKEDIR)/lint/doc8/include.mk
-include $(ONF_MAKEDIR)/lint/golang/include.mk
-include $(ONF_MAKEDIR)/lint/groovy/include.mk
-include $(ONF_MAKEDIR)/lint/jjb.mk
-include $(ONF_MAKEDIR)/lint/json.mk
-include $(ONF_MAKEDIR)/lint/license/include.mk
-include $(ONF_MAKEDIR)/lint/make/include.mk
-include $(ONF_MAKEDIR)/lint/python/include.mk
-include $(ONF_MAKEDIR)/lint/shell/include.mk
-include $(ONF_MAKEDIR)/lint/yaml/include.mk
+include $(onf-mk-dir)/lint/doc8/include.mk
+include $(onf-mk-dir)/lint/golang/include.mk
+include $(onf-mk-dir)/lint/groovy/include.mk
+include $(onf-mk-dir)/lint/jjb.mk
+include $(onf-mk-dir)/lint/json.mk
+include $(onf-mk-dir)/lint/license/include.mk
+include $(onf-mk-dir)/lint/make/include.mk
+include $(onf-mk-dir)/lint/python/include.mk
+include $(onf-mk-dir)/lint/shell/include.mk
+include $(onf-mk-dir)/lint/yaml/include.mk
-include $(ONF_MAKEDIR)/lint/help.mk
+include $(onf-mk-dir)/lint/help.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/license/include.mk b/makefiles/lint/license/include.mk
index 21c7636..523c0f7 100644
--- a/makefiles/lint/license/include.mk
+++ b/makefiles/lint/license/include.mk
@@ -28,9 +28,9 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(ONF_MAKEDIR)/lint/license/help.mk
-include $(ONF_MAKEDIR)/lint/license/install.mk
-include $(ONF_MAKEDIR)/lint/license/reuse.mk
+include $(onf-mk-dir)/lint/license/help.mk
+include $(onf-mk-dir)/lint/license/install.mk
+include $(onf-mk-dir)/lint/license/reuse.mk
# Alias targets
lint-license : lint-reuse
diff --git a/makefiles/lint/make/include.mk b/makefiles/lint/make/include.mk
index 2f49e88..03cb9e1 100644
--- a/makefiles/lint/make/include.mk
+++ b/makefiles/lint/make/include.mk
@@ -24,9 +24,9 @@
$(if $(DEBUG),$(warning ENTER))
## Bleeding early import handled by makefiles/include.mk
-# include $(ONF_MAKEDIR)/lint/make/warn-undef-vars.mk
+# include $(onf-mk-dir)/lint/make/warn-undef-vars.mk
-include $(ONF_MAKEDIR)/lint/make/makefile.mk
+include $(onf-mk-dir)/lint/make/makefile.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/make/warn-undef-vars.mk b/makefiles/lint/make/warn-undef-vars.mk
index 048d56d..36e25f9 100644
--- a/makefiles/lint/make/warn-undef-vars.mk
+++ b/makefiles/lint/make/warn-undef-vars.mk
@@ -26,7 +26,9 @@
## o Definitions only exist for lint target use.
## o Decrease warning volume until undef sources can be cleaned up.
## -----------------------------------------------------------------------
-$(if $(findstring --warn-undefined-variables,$(MAKEFLAGS)),\
+$(if $(findstring $(MAKEFLAGS),--warn-undefined-variables),\
+ $(eval IS-WARN-UNDEFINED-VARIABLES := true))
+$(if $(findstring $(MAKECMDGOALS),int lint-make),\
$(eval IS-WARN-UNDEFINED-VARIABLES := true))
ifdef IS-WARN-UNDEFINED-VARIABLES
@@ -64,6 +66,13 @@
$(call define-if-undef,DOC8_SOURCE)
$(call define-if-undef,have-python-files)
+ $(call define-if-undef,DEBUG-onf-mk-paths)
+ $(call define-if-undef,LINT_DOC8_DEBUG)
+
+ $(call define-if-undef,lint-shell-all)
+ $(call define-if-undef,lint-shell-mod)
+ $(call define-if-undef,lint-shell-src)
+
endif # IS-WARN-UNDEFINED-VARIABLES
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/python/include.mk b/makefiles/lint/python/include.mk
index 4c75e65..172f374 100644
--- a/makefiles/lint/python/include.mk
+++ b/makefiles/lint/python/include.mk
@@ -27,9 +27,9 @@
##-------------------##
$(if $(UNSTABLE),$(eval lint-python-all := true))
-include $(ONF_MAKEDIR)/lint/python/find_utils.mk
-include $(ONF_MAKEDIR)/lint/python/flake8.mk
-include $(ONF_MAKEDIR)/lint/python/pylint.mk
+include $(onf-mk-dir)/lint/python/find_utils.mk
+include $(onf-mk-dir)/lint/python/flake8.mk
+include $(onf-mk-dir)/lint/python/pylint.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/robot/include.mk b/makefiles/lint/robot/include.mk
index f71652e..7167015 100644
--- a/makefiles/lint/robot/include.mk
+++ b/makefiles/lint/robot/include.mk
@@ -26,9 +26,9 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(ONF_MAKEDIR)/lint/robot/robot.mk
-# include $(ONF_MAKEDIR)/lint/robot/excl.mk
-include $(ONF_MAKEDIR)/lint/robot/help.mk
-include $(ONF_MAKEDIR)/lint/robot/install.mk
+include $(onf-mk-dir)/lint/robot/robot.mk
+# include $(onf-mk-dir)/lint/robot/excl.mk
+include $(onf-mk-dir)/lint/robot/help.mk
+include $(onf-mk-dir)/lint/robot/install.mk
# [EOF]
diff --git a/makefiles/lint/shell/include.mk b/makefiles/lint/shell/include.mk
index 1398a36..2b73546 100644
--- a/makefiles/lint/shell/include.mk
+++ b/makefiles/lint/shell/include.mk
@@ -25,9 +25,9 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(ONF_MAKEDIR)/lint/shell/help.mk
-include $(ONF_MAKEDIR)/lint/shell/install.mk
-include $(ONF_MAKEDIR)/lint/shell/shellcheck.mk
+include $(onf-mk-dir)/lint/shell/help.mk
+include $(onf-mk-dir)/lint/shell/install.mk
+include $(onf-mk-dir)/lint/shell/shellcheck.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk b/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk
index 7f2ebfe..c930cdc 100644
--- a/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk
+++ b/makefiles/lint/yaml/byrepo/voltha-lib-go/include.mk
@@ -25,7 +25,7 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(ONF_MAKEDIR)/lint/yaml/byrepo/$(--repo-name--)/yamllint.mk
+include $(onf-mk-dir)/lint/yaml/byrepo/$(--repo-name--)/yamllint.mk
$(if $(DEBUG),$(warning LEAVE))
diff --git a/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk b/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk
index fb56e3a..8143bfe 100644
--- a/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk
+++ b/makefiles/lint/yaml/byrepo/voltha-lib-go/yamllint.mk
@@ -31,7 +31,7 @@
## Add requirement(s) for checking
## -------------------------------
yamllint-cfg := yamllint.helm
-yamllint-conf = $(wildcard $(yamllint-cfg) $(ONF_MAKEDIR)/lint/yaml/$(yamllint-cfg))
+yamllint-conf = $(wildcard $(yamllint-cfg) $(onf-mk-dir)/lint/yaml/$(yamllint-cfg))
yamllint-args += $(addprefix --config-file$(space),$(yamllint-conf))
yamllint-args += --strict
diff --git a/makefiles/lint/yaml/include.mk b/makefiles/lint/yaml/include.mk
index 7518d51..7191abe 100644
--- a/makefiles/lint/yaml/include.mk
+++ b/makefiles/lint/yaml/include.mk
@@ -27,16 +27,16 @@
##--------------------##
##---] INCLUDES [---##
##--------------------##
-include $(ONF_MAKEDIR)/lint/yaml/help.mk
-# include $(ONF_MAKEDIR)/lint/yaml/find_utils.mk
-include $(ONF_MAKEDIR)/lint/yaml/install.mk
+include $(onf-mk-dir)/lint/yaml/help.mk
+# include $(onf-mk-dir)/lint/yaml/find_utils.mk
+include $(onf-mk-dir)/lint/yaml/install.mk
# [TODO] Consolidate and refactor to support a simpler answer
# Special snowflake linting requirements
--include $(ONF_MAKEDIR)/lint/yaml/byrepo/$(--repo-name--)/include.mk
+-include $(onf-mk-dir)/lint/yaml/byrepo/$(--repo-name--)/include.mk
# Standard lint-yaml targets
-include $(ONF_MAKEDIR)/lint/yaml/yamllint.mk
+include $(onf-mk-dir)/lint/yaml/yamllint.mk
--onf-mk-lint-yaml-- := true# # Flag to inhibit re-including