VOL-4836: Interactive helm chart linting.
repo:voltha-docs job reported reactive post-commit linting errors.
Begin adding support for make target lint-helm for early detection.
Makefile
--------
o Adding comments for readability.
o Disable failing/unused targets.
o Update help text.
o Migrating some targets and deps from Makefile proper into makefiles/*.
makefiles/README.md
-------------------
o Added a basic makefile readme with pointers to other web resources.
makefiles/lint/include.mk
makefiles/lint/helm/include.mk
-------------------------
o Initial support for library makefile target: 'lint-helm'
o Added common targets: clean, help, sterile and todo.
o Target 'pre-commit added:
- default target to support interactive use of lint-helm.
- Cleanup needed before common target can use lint-helm as a default.
o Interim answer: briding the gap between existing and portable logic.
o legacy logic (USE_LEGACY=1 (default)):
- Relies on .gitreview and hardcoding defaults (opencord/master).
- git has builtin support for local/remote branch queries.
- updates to support queries which simplify logic.
o Interactive target lint-helm-deps
- Configure helm charts per linting logic in gerrit/jenkins job.
- Interactive target will invoke make target with USE_LEGACY=$(null).
Change-Id: I43616d16707a09da6f907f909c65504da9933a6f
diff --git a/makefiles/lint/include.mk b/makefiles/lint/include.mk
index f904217..d3975de 100644
--- a/makefiles/lint/include.mk
+++ b/makefiles/lint/include.mk
@@ -13,14 +13,25 @@
# 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
# -----------------------------------------------------------------------
-help::
- @echo
- @echo "[LINT]"
+# ------------------------------------------------
+# On-demand loading:
+# - lint helm charts
+# - on demand for now, errors and cleanup needed
+# - Usage: make lint-helm USE_LEGACY=<blank>
+# ------------------------------------------------
+$(if $(findstring lint-helm,$(MAKECMDGOALS)),\
+ $(eval include $(MAKEDIR)/lint/helm/include.mk))
-include $(MAKEDIR)/lint/helm.mk
-
+# ------------------------------------------------------------
+## yaml checking
+## o yamllint - check everything, all the time.
+## o python - dependency based checking
+# ------------------------------------------------------------
ifdef YAML_FILES
include $(MAKEDIR)/lint/yaml/python.mk
else