Add pre-commit hook to check for merge conflicts#17279
Conversation
|
This is interesting. How fast is this pre-commit step? I'm a bit annoyed by how slow our pre-commit is if I use I guess my concern is, I don't want to make my workflow significantly slower and this is already something that otherwise gets catched in CI |
|
I'm also a bit sceptical this will be that useful -- it's a pretty fast hook IIRC, but I'm not convinced it'll be that useful given that merge conflicts are pretty easy to catch in CI through our existing checks. And I agree that our pre-commit is already somewhat slow locally. |
|
In my experience, it's a super fast lightweight hook; and one of the standard pre-commit hooks. The builtin hooks are pretty optimized. This also catches merge conflicts in code areas that are not run: like say documentation, text files or other file types. |
|
Okay, I checked out this PR locally and the new hook is basically instantaneous on this repo. So if this will help some of our contributors, let's go for it. Thanks! |
Summary
airflow] Expand module path check to individual symbols (AIR302) #17278. This will flag any commits that contain merge-conflict strings before they are pushed to branches.Test Plan
airflow] Expand module path check to individual symbols (AIR302) #17278 . This is one of the builtin standard hooks and I have used it in many repos.