Skip to content

Commit 980be01

Browse files
aRustyDevclaude
andcommitted
feat: Make validate-frontmatter pip installable
- Created pre_commit_hooks Python package structure - Added validate-frontmatter console script entry point - Updated setup.py with entry_points configuration - Updated pyproject.toml with [project.scripts] section - Changed .pre-commit-hooks.yaml to use 'validate-frontmatter' command with language: python - Added pyyaml>=5.0 dependency - Created MANIFEST.in for proper package distribution - Added Python build artifacts to .gitignore The validate-frontmatter hook is now pip installable: pip install arustydev-pre-commit-hooks Usage: validate-frontmatter --help validate-frontmatter file1.md file2.md validate-frontmatter --config custom.json --cache /tmp/cache.json 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 4456103 commit 980be01

7 files changed

Lines changed: 836 additions & 3 deletions

File tree

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
# Python build artifacts
3+
__pycache__/
4+
*.py[cod]
5+
*.class
6+
*.egg-info/
7+
dist/
8+
build/
9+
.eggs/
10+
.venv/
11+
venv/

.pre-commit-hooks.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,9 @@
315315
- id: validate-frontmatter
316316
name: Validate Markdown Frontmatter
317317
description: Validate frontmatter UUIDs and cross-references in markdown files
318-
entry: python3 .ai/scripts/validate-frontmatter.py
319-
language: system
318+
entry: validate-frontmatter
319+
language: python
320320
files: \.md$
321321
exclude: ^(README\.md|CHANGELOG\.md|\.github/.*\.md|\.ai/templates/.*|\.ai/artifacts/.*|docs/prompts/.*|docs/project-knowledge/user/.*)$
322322
pass_filenames: true
323+
additional_dependencies: []

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
include VERSION
2+
include README.md
3+
include LICENSE
4+
include .pre-commit-hooks.yaml
5+
recursive-include pre_commit_hooks *.py
6+
recursive-include hooks *.sh *.nix

pre_commit_hooks/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
"""aRustyDev's pre-commit hooks collection."""
2+
3+
__version__ = "0.2.1"

0 commit comments

Comments
 (0)