Skip to content
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

Invoke composer validate after merge driver completed #14

Open
staabm opened this issue Sep 6, 2019 · 1 comment
Open

Invoke composer validate after merge driver completed #14

staabm opened this issue Sep 6, 2019 · 1 comment

Comments

@staabm
Copy link

staabm commented Sep 6, 2019

The readme mentions

When a merge conflict occurs where the last property of an object is removed, accepting the removed version will result in invalid syntax due to a trailing comma on the preceding property. Care should be taken to verify the syntax of the overall file and manually update accordingly.

Would it be possible that the merge driver automatically invokes composer validate after a merge to make sure (and the user aware) if the generated files contain a syntax error after merge (so we dont need to manually be aware of this edge case)?

@balbuf
Copy link
Owner

balbuf commented Jun 22, 2020

The merge driver itself would be inappropriate for this purpose, since it has already been fully executed by the time the user is manually fixing merge conflicts and where this edge case would occur. Instead, this would be best performed in a pre-commit hook or some other appropriate git hook. I think it would be in the scope of this project, if you or anyone else would like to propose a sample git hook to include in the repo which can be manually installed just like the driver itself.

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

No branches or pull requests

2 participants