Create default pre-commit-config.yaml when missing
This commit makes a few small fixes, but is primarily intended to fix
an issue with "make pre-commit" when .pre-commit-config.yaml file
isn't present.
makefiles/commands/pre-commit/pre-commit.mk
-------------------------------------------
o Depend on target pre-commit-install VS venv.
o Virtualenv target requirements.txt config lacks package pre-commit.
makefiles/commands/pre-commit/install.mk
----------------------------------------
o Fixed requirements.txt path typo:
+ Copy pre-c/requirements.txt VS tox/requirements.txt.
+ Contributed to variant target behavior when used in a prisine/cloned sandbox.
targets: pre-commit VS pre-commit-install
o Define installer target and path vars containing .pre-commit-config.yaml
so a default tool config file can be installed.
.gitreview
bin/setup.sh
------------
o Cleanup a few pre-commit complaints in source.
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Change-Id: I03843c906798036a32a45e965d4c1a9cdd72be8b
diff --git a/makefiles/commands/pre-commit/pre-commit.mk b/makefiles/commands/pre-commit/pre-commit.mk
index 6b59a0c..104fbcd 100644
--- a/makefiles/commands/pre-commit/pre-commit.mk
+++ b/makefiles/commands/pre-commit/pre-commit.mk
@@ -24,7 +24,7 @@
## Intent: Invoke the pre-commit command
## -----------------------------------------------------------------------
.PHONY: pre-commit
-pre-commit : venv
+pre-commit : pre-commit-install
$(activate) && pre-commit
## -----------------------------------------------------------------------