Git/pre-commit

From Freephile Wiki
< Git
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Use the pre-commit framework to manage pre-commit hooks in your Git repo.

(.venv) greg@gdisc:~/src/meza$ git commit

now looks like this:

/home/greg/src/meza/.git/hooks/pre-commit.legacy: line 14: print_status: command not found
[PRE-COMMIT] Found 1 staged YAML files to lint
[LINT] Activating virtual environment: /home/greg/src/meza/.venv
[LINT] Starting Meza file linting...
[LINT] Found 1 files to lint
[LINT] Linting YAML file: .pre-commit-config.yaml
[SUCCESS] YAML lint passed: .pre-commit-config.yaml

[LINT] Linting complete!
[SUCCESS] All files passed linting checks!
[SUCCESS] All staged files passed linting!
Trim Trailing Whitespace.................................................Passed
Fix End of Files.........................................................Passed
Check Yaml...............................................................Passed
Check for added large files..............................................Passed
[fix-permissions 538730dd] Add pre-commit framework
 2 files changed, 12 insertions(+)
 create mode 100644 .pre-commit-config.yaml
 create mode 100644 requirements-dev.txt