Misc cleanups, add installer for lint-groovy
makefiles/npm/README.md
makefiles/npm/include.mk
makefiles/npm/nvm.mk
makefiles/npm/npm.mk
-------------------------
o Genreate targets and deps for installing tools nvm, npm and npm-groovy-lint.
o Tools are intended for interactive use.
o npm-groovy-lint is a dependency for the lint-groovy target
config.mk
.gitignore
----------
o Add exclusion lf/onf-make for repo:onf-make git submodule.
o Add exclusion for .tmp (makefiles/nvm/nvm.mk)
makefiles/lint/groovy/groovy.mk
makefiles/lint/groovy/include.mk
makefiles/lint/groovy/install.mk
--------------------------------
o Update targets to latest lint-{language}-{all,mod,src} syntax.
o Installer updated to depend on npm/nvm.mk target 'npm-groovy-install'.
makefiles/lint/make/makefile.mk
makefiles/lint/json.mk
makefiles/lint/python/flake8.mk
makefiles/lint/shell/shellcheck.mk
makefiles/lint/yaml.mk
------------------------
o Simplify find command exclusions.
o Use "-not -path [p]" in place of "( -name p ) -prune".
makefiles/main/tempdir/tempdir.mk
---------------------------------
o Fixed a typo $(HELP) -> $(HIDE)
makefiles/lint/doc8/doc8.ini
-------------------------------
o Add directory exclusions from onf-excl-dir=.
o Remove txt from the list of file extensions to check
repo:voltha-docs is the only repo with *.txt files that contain
restructuredText so add the extension in the local per-repository
config.
Signed-off-by: Joey Armstrong <jarmstrong@linuxfoundation.org>
Change-Id: Ia2e091d812af82063c79ed855bc7dd4f5ec8f706
diff --git a/makefiles/lint/python/find_utils.mk b/makefiles/lint/python/find_utils.mk
index ce4ad8c..15159bd 100644
--- a/makefiles/lint/python/find_utils.mk
+++ b/makefiles/lint/python/find_utils.mk
@@ -23,15 +23,6 @@
# -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-## Intent: Construct a string for invoking find \( excl-pattern \) -prune
-# -----------------------------------------------------------------------
-gen-python-find-excl = \
- $(strip \
- -name '__ignored__' \
- $(foreach dir,$($(1)),-o -name $(dir)) \
- )
-
-## -----------------------------------------------------------------------
## Intent: Construct a find command to gather a list of python files
## with exclusions.
## -----------------------------------------------------------------------
@@ -41,8 +32,8 @@
gen-python-find-cmd = \
$(strip \
find . \
- \( $(call gen-python-find-excl,onf-excl-dirs) \) -prune \
- -o -name '*.py' \
+ $(foreach dir,$(onf-excl-dirs),-not -path './$(dir)/*') \
+ -a -name '*.py' \
-print0 \
)
diff --git a/makefiles/lint/python/flake8.mk b/makefiles/lint/python/flake8.mk
index 447906e..c297d94 100644
--- a/makefiles/lint/python/flake8.mk
+++ b/makefiles/lint/python/flake8.mk
@@ -55,9 +55,6 @@
$(activate) && $(call gen-python-find-cmd) \
| $(xargs-n1) flake8 --max-line-length=99 --count
-# && find . \( $(flake8-find-filter) \) -prune -o -name '*.py' -print0 \
-# | $(xargs-n1) flake8 --max-line-length=99 --count
-
## -----------------------------------------------------------------------
## Intent: check deps for format and python3 cleanliness
## Note:
diff --git a/makefiles/lint/python/pylint.mk b/makefiles/lint/python/pylint.mk
index e83c2c1..2ed70e8 100644
--- a/makefiles/lint/python/pylint.mk
+++ b/makefiles/lint/python/pylint.mk
@@ -46,19 +46,11 @@
## -----------------------------------------------------------------------
## Intent: exhaustive pylint syntax checking
## -----------------------------------------------------------------------
-
-# Construct: find . \( -name '__ignored__' -o -name dir -o name dir \)
-# pylint-find-filter := $(null)
-# pylint-find-filter += -name '__ignored__'# # for alignment
-# pylint-find-filter += $(foreach dir,$(onf-excl-dirs),-o -name $(dir)))
-
-# pylint-find-filter := $(call gen-python-find-excl,onf-excl-dirs)
-# $(error pylint-find-filter := $(pylint-find-filter))
lint-pylint-all: $(venv-activate-script)
+
$(MAKE) --no-print-directory lint-pylint-install
$(activate) && $(call gen-python-find-cmd) | $(xargs-n1) pylint
-# | $(xargs-n1-clean) yamllint --strict
## -----------------------------------------------------------------------
## Intent: check deps for format and python3 cleanliness