-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add Git conflict marker detection #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Add check-conflict-markers.sh script (95 lines) - Integrate CI workflow for automated checks - Document usage and troubleshooting - Scans for <<<<<<, =======, >>>>>>>, ||||||| markers - Prevents commits with unresolved merge conflicts - Update CHANGELOG.md
💡 Tip: Consider Using Draft PRsBenefits of opening PRs as drafts initially:
How to convert:
This is just a friendly reminder - feel free to continue as is! 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds automated detection of Git merge conflict markers to prevent accidental commits of broken code. A new shell script scans all tracked text files for conflict markers (<<<<<<<, =======, >>>>>>>, and diff3-style |||||||) and integrates with GitHub Actions to run on every PR and push to main.
Key Changes:
- New shell script that scans tracked files and reports conflicts with file locations and line numbers
- CI/CD integration via GitHub Actions workflow
- Comprehensive documentation with usage examples and troubleshooting guide
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
scripts/check-conflict-markers.sh |
Core detection script that scans tracked files for four types of conflict markers using grep patterns |
.github/workflows/check-conflict-markers.yml |
CI workflow that runs the conflict marker check on PRs and pushes to main branch |
docs/scripts/CHECK_CONFLICT_MARKERS.md |
Complete user guide covering usage, detected patterns, troubleshooting, and integration examples |
CHANGELOG.md |
Documents the new conflict marker detection feature in the Unreleased section |
- Fix diff3 marker pattern: Change '||||||' to '||||||| ' (6→7 pipes + space) - Update CHANGELOG: Correct conflict marker pattern to '||||||| ' - Update docs table: Fix diff3 marker pattern with trailing space - Fix docs link: Change '../scripts/preflight.sh' to 'PREFLIGHT.md' Resolves 4 Copilot review comments. Nitpick #4 (copyright format) is correct as-is.
Prevents false positives in conflict marker detection script by indenting the example markers in documentation.
💡 Tip: Consider Using Draft PRsBenefits of opening PRs as drafts initially:
How to convert:
This is just a friendly reminder - feel free to continue as is! 😊 |
Purpose
Add automated detection of Git merge conflict markers to prevent accidentally committing unresolved conflicts.
Changes
New Files:
scripts/check-conflict-markers.sh(95 lines) - Shell script that scans all tracked files.github/workflows/check-conflict-markers.yml- CI integration (runs on PRs and main pushes)docs/scripts/CHECK_CONFLICT_MARKERS.md- Complete usage guide (197 lines)Modified:
CHANGELOG.md- Document new featureFeatures
<<<<<<<,=======,>>>>>>>,|||||||Example Output
Testing
Related
Quality