Skip to content

Add markdownlint autofix and pre-commit hooks#1

Merged
gundalow merged 8 commits intomainfrom
markdown-lint
Apr 10, 2026
Merged

Add markdownlint autofix and pre-commit hooks#1
gundalow merged 8 commits intomainfrom
markdown-lint

Conversation

@gundalow
Copy link
Copy Markdown
Contributor

@gundalow gundalow commented Apr 9, 2026

Summary

This PR adds comprehensive markdown linting with autofix capabilities and pre-commit hooks to ensure code quality. All markdown files have been cleaned up and formatted according to the project's linting rules.

Changes

Markdown Fixes

  • Fixed all MD013 line-length errors (29 lines across 8 files)
  • Fixed MD036 emphasis-as-heading errors in command files
  • Fixed MD060 table formatting errors in cop-review and zen skill
  • All committed files now pass markdownlint validation

Pre-commit Infrastructure

  • Added .pre-commit-config.yaml with hooks for:
    • Markdown linting (markdownlint-cli2)
    • YAML linting (yamllint)
    • Shell script checking (shellcheck)
    • JSON validation
    • File formatting (trailing whitespace, EOF, line endings)
  • Added .markdownlint-cli2.yaml configuration
  • Added .gitignore for node_modules and package-lock.json

Documentation

  • Updated CONTRIBUTING.md with linting and pre-commit instructions
  • Added development section with usage examples

GitHub Actions Sync

  • Fixed YAML syntax in workflow files
  • Pre-commit hooks use identical rules to GitHub Actions
  • Ensures consistency between local development and CI

Files Changed

  • 15 files changed
  • 260 insertions(+), 99 deletions(-)
  • All markdown files auto-fixed and manually reviewed
  • All pre-commit hooks passing

Testing

Pre-commit hooks verified to pass:

✅ Lint Markdown files........Passed
✅ Lint YAML files............Passed
✅ Validate JSON files........Passed
✅ Fix end of files...........Passed
✅ Trim trailing whitespace...Passed
✅ Fix mixed line endings.....Passed

Usage

After merging, contributors should:

pip install pre-commit
pre-commit install

Hooks will automatically run on every commit to ensure code quality.

🤖 Generated with Claude Code

@gundalow gundalow marked this pull request as draft April 9, 2026 20:40
gundalow and others added 7 commits April 10, 2026 08:54
- Fixed all MD013 line-length errors in markdown files
- Fixed MD036 emphasis-as-heading errors in command files
- Fixed MD060 table formatting errors
- Fixed YAML syntax in GitHub workflow files
- Added pre-commit hooks for markdown, YAML, shellcheck, and JSON validation
- Added markdownlint-cli2 configuration
- Updated CONTRIBUTING.md with linting instructions
- Pre-commit hooks synchronized with GitHub Actions workflows

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Fix self-referential placeholder check in validate.yml
- Add .gitkeep files to empty directories for module structure validation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The grep command was finding itself in the workflow file.
Exclude .github from the search to prevent this self-reference.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add -r flag to read command to prevent backslash mangling (SC2162)
- Add quotes around variable to prevent globbing (SC2086)
- Replace deprecated fail_on_error with fail_level parameter

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add ansible-awesome-ai.md with all MD013 line-length errors fixed
- Remove ansible-awesome-ai.md from linting ignore lists
- Enable markdown validation for the file in pre-commit and CLI config

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add spaces around table separators for proper markdown formatting.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add .gitkeep files to create required commands/ and agents/ directories.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@gundalow gundalow marked this pull request as ready for review April 10, 2026 12:45
@gundalow gundalow merged commit 20c5700 into main Apr 10, 2026
11 checks passed
@gundalow gundalow deleted the markdown-lint branch April 10, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant