-
Notifications
You must be signed in to change notification settings - Fork 972
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
fix: Make Git conflict markers check more precise #6379
base: main
Are you sure you want to change the base?
fix: Make Git conflict markers check more precise #6379
Conversation
@ferrarimarco I noticed the tick was added for breaking change item in previous PR: |
1c5780a
to
dbdc0db
Compare
test/linters/git_merge_conflict_markers/git_merge_conflict_markers_good_02.txt
Show resolved
Hide resolved
That's for maintainers to state that they checked the PR and deemed that as non-breaking, in this case. |
The super-linter#6113 introduced new Git merge conflicts linter check, that is error prone in some conditions (see screenshot). This PR adjusts this check to be more precise and exact in a way that all three markers should be found to identify check as failed. Additionally improve Git merge conflict markers matchers. Repro: ![image](https://github.com/user-attachments/assets/119c9a17-652a-4a6e-88a9-108d347f6f55) ```shell > grep -E '^(<<<<<<<|=======|>>>>>>>)' README.md ========================================================== ============= MegaLinter, by OX.security ============= ========= https://ox.security?ref=megalinter =========== ========================================================== ``` Replaces super-linter#6374
dbdc0db
to
8bdd4a9
Compare
Checks failure isn't relevant: https://github.com/super-linter/super-linter/actions/runs/11959522598/job/33342347913?pr=6379 |
@ferrarimarco Should I do something about this failure? |
Not really. We just need to wait for a dependency update. Thanks! |
Gotcha. Thanks. Please ping me if there's anything I need or can do about this PR. |
Looks like either of these two should bring in an update once new version of |
@ferrarimarco The new version of |
We'd need to wait for |
Ah, I see. Tedious =) |
I still couldn't update my repo to use 7.2.0, as it fails on patch files (diffs) we hold to apply on an external code. I don't see a way to configure that "linter". How would you suggest to handle patch files? |
Out of interest: how your patch files content looks like? |
The PR: OSGeo/grass-addons#1246
I didn't go and read how this check is implemented here, I understand that it is made in-house, but how does it compare to a similar check from pre-commit hooks? Do they have the same problem? https://github.com/pre-commit/pre-commit-hooks?tab=readme-ov-file#check-merge-conflict |
As of look of it, false positives for all those files should be resolved by this PR once it's merged into
Do they have the same problem: yes and no. They use a more stricter check than what this repo has in UPD: that check from |
The #6113 introduced new Git merge conflicts linter check, that is error prone in some conditions (see screenshot).
This PR adjusts this check to be more precise and exact in a way that all three markers should be found to identify check as failed. Additionally improve Git merge conflict markers matchers.
Repro:
Replaces #6374
Readiness checklist
In order to have this pull request merged, complete the following tasks.
Pull request author tasks
Conventional Commit v1.0.0 spec.
upgrade guide.
Fix #ISSUE_NUMBER
orClose #ISSUE_NUMBER
text to the description ofthe pull request.
Super-linter maintainer tasks
breaking
if this change breaks compatibility with the previousreleased version.
automation
,bug
,documentation
,enhancement
,infrastructure
.with the version that release-please proposes in the
preview-release-notes
CI job.