pre-commit/pre_commit/commands
Konrad Weihmann 91f0344b08 hook: enable calling out of tree entries
in the following setup

├── common
│   ├── .pre-commit-config.yaml
│   ├── script1.sh
│   └── script-config
├── repo1
│   └── code_file
└── repo2
    └── code_file

a common configuration from 'common' folder will be installed using an
absolute path to repo1 and repo2.
As local tools needs to be run (script1.sh with its
configuration script-config) we need to pass the path to common
somehow into the hook cmdline.

Add support for a template variable %CONFIG_BASEPATH% which
is automatically expanded to the configuration directory when
pre-commit run is called

This helps to create a single source of truth setup, while still
keeping the possibility to call non public tools and configurations

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
2022-04-22 13:26:23 +02:00
..
__init__.py Move commands into their own files. 2014-06-13 19:52:14 -07:00
autoupdate.py Pick a tag if multiple tags exist on a SHA. 2022-03-31 10:37:51 -04:00
clean.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
gc.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
hook_impl.py pre-push: fix stdin line splitting when <local ref> has whitespace 2022-04-14 14:27:46 -07:00
init_templatedir.py implement default_install_hook_types 2022-04-02 15:11:31 -04:00
install_uninstall.py Merge pull request #2322 from pre-commit/default-install-hook-types 2022-04-02 15:36:59 -04:00
migrate_config.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
run.py hook: enable calling out of tree entries 2022-04-22 13:26:23 +02:00
sample_config.py drop python 3.6 support 2022-01-18 18:44:20 -05:00
try_repo.py drop python 3.6 support 2022-01-18 18:44:20 -05:00