Git: pre-receive hook with PHP_CodeSniffer

后端 未结 10 1615
情话喂你
情话喂你 2021-02-04 07:51

Since switching from SVN to Git, we lost the ability to enforce our coding standards through a pre-commit hook on the subversion server.

With Git, you only

10条回答
  •  孤独总比滥情好
    2021-02-04 08:44

    I don't speek good 'git-anese', but in Mercurial there's a hook option called 'changegroup' that essentially checks the 'top' commit of a group of incoming commits. Maybe someone in the community can tell you if there's an equiv. of 'changegroup' for git?

    https://www.mercurial-scm.org/wiki/Hook#The_changegroup_hook

提交回复
热议问题