feat: implement dynamic test generation and resolve pre-commit conflicts

- Replace static test fixture files with dynamic test generation
- Implement comprehensive test suite with unit, integration, and golden master tests
- Add vim API mocking for standalone Lua test execution
- Fix pre-commit hook interference by eliminating external fixture files
- Add StyLua formatting for consistent Lua code style
- Enhance ShellSpec formatting with improved HEREDOC and comment handling
- Update documentation with new test architecture details

This resolves issues where pre-commit hooks (shfmt, end-of-file-fixer) were
modifying test fixture files and breaking golden master tests. The new dynamic
approach generates test data programmatically, making tests immune to formatting
tools while maintaining comprehensive coverage.
This commit is contained in:
2025-09-09 23:11:47 +03:00
parent ce620cd035
commit b54d6ed365
10 changed files with 1079 additions and 69 deletions

View File

@@ -3,7 +3,6 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: requirements-txt-fixer
- id: detect-private-key
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
@@ -22,6 +21,11 @@ repos:
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
- repo: https://github.com/JohnnyMorganz/StyLua
rev: v2.1.0
hooks:
- id: stylua-github # or stylua-system / stylua
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.45.0
hooks:
@@ -51,12 +55,12 @@ repos:
args: ["-shellcheck="]
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 41.97.9
rev: 41.99.1
hooks:
- id: renovate-config-validator
- repo: https://github.com/bridgecrewio/checkov.git
rev: "3.2.469"
rev: "3.2.470"
hooks:
- id: checkov
args: