Thank you for your interest in contributing! This document provides guidelines for contributing to this project.
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
- Bash 4.0+
- Git
- ShellCheck (recommended)
# Clone the repository
git clone https://github.com/fidpa/bash-markdown-link-validator.git
cd bash-markdown-link-validator
# Test locally
./validate-docs-wrapper.sh# Validate test fixtures
cd test/
bash ../src/validate-markdown-links.sh test-docs/
# Expected: 0 broken links- Error Handling: Use
set -uo pipefailat the top of scripts - Quoting: Always quote variables:
"$variable" - Functions: Use snake_case for function names
- Comments: Add comments for complex logic
- Exit Codes: Use meaningful exit codes (0 = success, 1+ = errors)
All scripts must pass ShellCheck validation:
shellcheck src/*.sh examples/*.sh install.sh- Indentation: 4 spaces (no tabs)
- Line Length: Max 120 characters
- Braces: Use
{...}for all variables:"${var}"
Follow Conventional Commits:
<type>(<scope>): <subject>
<body>
<footer>
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting, no logic change)refactor: Code refactoringtest: Adding/updating testschore: Maintenance tasks
feat(validator): add support for relative anchor links
- Implement suffix-matching for anchor resolution
- Add test cases for edge cases
- Update documentation
Closes #42
fix(parser): handle markdown tables with pipes
Previously failed on tables with inline code containing pipes.
Now properly escapes pipe characters in code blocks.
Fixes #38
- Test locally: Run
./validate-docs-wrapper.shon your changes - ShellCheck: Ensure all scripts pass
shellcheck - Update docs: Add/update documentation if needed
- CHANGELOG: Add entry to
CHANGELOG.mdunder[Unreleased]
- Fork the repository
- Create a branch:
git checkout -b feature/your-feature-name - Commit changes: Follow commit message format
- Push:
git push origin feature/your-feature-name - Open PR: Use the PR template (if available)
## Description
[Brief description of changes]
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Tested locally with test fixtures
- [ ] ShellCheck passes
- [ ] No regressions on existing test cases
## Related Issues
Closes #[issue number]- PRs require at least one approval
- CI checks must pass (when configured)
- Address review comments promptly
- Squash commits before merging (if requested)
# Test on sample docs
./validate-docs-wrapper.sh
# Test with specific exclusions
EXCLUDE_DIRS="archive|deprecated" ./validate-docs-wrapper.sh
# Test JSON output
./src/validate-markdown-links.sh docs/ --json- Validates correct links without errors
- Detects broken links correctly
- Handles edge cases (spaces, umlauts, special chars)
- Anchor resolution works (suffix-match)
- JSON output is valid
- Wrapper system functions correctly
- Search existing issues: Check if already reported
- Test latest version: Update to latest release
- Minimal reproduction: Provide minimal test case
## Description
[Clear description of the issue]
## Steps to Reproduce
1. Step 1
2. Step 2
3. ...
## Expected Behavior
[What should happen]
## Actual Behavior
[What actually happens]
## Environment
- OS: [e.g., Ubuntu 22.04, macOS 13]
- Bash Version: [output of `bash --version`]
- Tool Version: [output of `git describe --tags`]
## Additional Context
[Logs, screenshots, config files]- Documentation: Check docs/
- Discussions: Use GitHub Discussions
- Security: See SECURITY.md
Thank you for contributing! 🎉