shibapm / Komondor

Git Hooks for Swift projects 🐩
MIT License
552 stars 32 forks source link

pre-push hook doesn't work in xcode #33

Open kjing opened 4 years ago

kjing commented 4 years ago

Hi, we try to use Komondor to set up a pre-push hook to run swiftlint before pushing any changes in an IOS project. For some reason, the pre-push hook doesn't work in xcode(11.4.1), xcode allow a push without running swiftlint. The same config and same project, it works fine in the command line "git push". Also, in other IDE, vscode or tower. It does block push with a general error without showing the linting error. any idea why? Is it a known issue in xcode?

orta commented 4 years ago

perhaps they use libgit and that doesn't trigger hooks?

kjing commented 4 years ago

@orta thanks for your response. likely it doesn't trigger any hooks in xcode. also, in vscode or tower, it does trigger pre-push hook, but just give general error message without any linting error. It will confuse users.

orta commented 4 years ago

You're welcome to look into getting them working 👍 - I just use git, and this technique comes over from ruby/node land