VOL-4836: VOLTHA release prep.
Makefile
--------
o Update copyright notice.
o include a few library makefiles for displaying help, etc.
o Added target sterile to make clean + remove venv.
o Replace inlined rm -fr, rm -f with make builtin $(RM) && $(RM) -r
tox.ini
-------
o Add more interpreter versions to envlist so python 3.10.x can be used.
Change-Id: Ideb7e30ff703dff18b707226a4821455f5b1f261
diff --git a/makefiles/lint/include.mk b/makefiles/lint/include.mk
index b8a1b88..979a6fb 100644
--- a/makefiles/lint/include.mk
+++ b/makefiles/lint/include.mk
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2017-2023 Open Networking Foundation
+# Copyright 2017-2022 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.
@@ -18,18 +18,11 @@
help::
@echo
@echo "[LINT]"
- @echo " lint Static code analysis/syntax checking"
- @echo " LOCAL_LINT=1 Enable local linting w/o docker & jenkins overhead"
-ifdef LOCAL_LINT
- # include $(MAKEDIR)/lint/json.mk # venv dependency
- include $(MAKEDIR)/lint/golang/sca.mk
- include $(MAKEDIR)/lint/license/include.mk # exclusions needed
- # include $(MAKEDIR)/lint/python.mk
- # include $(MAKEDIR)/lint/robot.mk # venv dependency
- # include $(MAKEDIR)/lint/yaml.mk # venv needed -- alt: yamllint
-endif
-
-include $(MAKEDIR)/lint/shell.mk # cleanup needed
+include $(MAKEDIR)/lint/json.mk
+include $(MAKEDIR)/lint/python.mk
+include $(MAKEDIR)/lint/robot.mk
+include $(MAKEDIR)/lint/shell.mk
+include $(MAKEDIR)/lint/yaml.mk
# [EOF]
diff --git a/makefiles/lint/json.mk b/makefiles/lint/json.mk
index cc9ecfa..0a11c71 100644
--- a/makefiles/lint/json.mk
+++ b/makefiles/lint/json.mk
@@ -15,7 +15,7 @@
# limitations under the License.
# -----------------------------------------------------------------------
-JSON_FILES ?= $(error JSON_FILES= is required)
+JSON_FILES ?= $(error JSON_FILES= is rqeuired)
.PHONY: lint-json
diff --git a/makefiles/lint/license/include.mk b/makefiles/lint/license/include.mk
index aaf6e47..538a415 100644
--- a/makefiles/lint/license/include.mk
+++ b/makefiles/lint/license/include.mk
@@ -1,6 +1,6 @@
# -*- makefile -*-
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation
+# 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.
diff --git a/makefiles/lint/license/license-check.sh b/makefiles/lint/license/license-check.sh
index 10d3376..bbf560e 100755
--- a/makefiles/lint/license/license-check.sh
+++ b/makefiles/lint/license/license-check.sh
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation
+# 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.
diff --git a/makefiles/lint/license/license-helper.sh b/makefiles/lint/license/license-helper.sh
index 499f854..0f690e4 100755
--- a/makefiles/lint/license/license-helper.sh
+++ b/makefiles/lint/license/license-helper.sh
@@ -1,6 +1,6 @@
#!/bin/bash
# -----------------------------------------------------------------------
-# Copyright 2022 Open Networking Foundation
+# 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.
diff --git a/makefiles/lint/python.mk b/makefiles/lint/python.mk
index 86503a7..5aecd58 100644
--- a/makefiles/lint/python.mk
+++ b/makefiles/lint/python.mk
@@ -21,11 +21,12 @@
lint : lint-python
+# check deps for format and python3 cleanliness
lint-python: vst_venv
- -source ./$</bin/activate \
- && set -u \
- && pylint $(PYTHON_FILES) \
- && flake8 --max-line-length=99 --count $(PYTHON_FILES)
+ source ./$</bin/activate \
+ ; set -u \
+ ; pylint --py3k $(PYTHON_FILES) \
+ ; flake8 --max-line-length=99 --count $(PYTHON_FILES)
help::
@echo " lint-python Syntax check using pylint and flake8"
diff --git a/makefiles/lint/robot.mk b/makefiles/lint/robot.mk
index 9808602..ec5579e 100644
--- a/makefiles/lint/robot.mk
+++ b/makefiles/lint/robot.mk
@@ -32,8 +32,8 @@
lint-robot: vst_venv
source ./$</bin/activate \
- && set -u \
- && rflint $(LINT_ARGS) $(ROBOT_FILES)
+ ; set -u \
+ ; rflint $(LINT_ARGS) $(ROBOT_FILES)
help::
@echo " lint-robot Syntax check robot sources using rflint"
diff --git a/makefiles/lint/shell.mk b/makefiles/lint/shell.mk
index 9f8cd58..da92921 100644
--- a/makefiles/lint/shell.mk
+++ b/makefiles/lint/shell.mk
@@ -23,7 +23,7 @@
lint-shell:
shellcheck --version
- find . \( -name 'staging' -o -name 'vst_venv' -o -name 'vendor' \) -prune \
+ find . \( -name 'staging' -o -name 'vst_venv' \) -prune \
-o -name '*.sh' ! -name 'activate.sh' -print0 \
| xargs -0 -n1 shellcheck