PHP Syntax checking pre-source control

后端 未结 6 1441
孤城傲影
孤城傲影 2021-02-05 01:30

Referring to Is there a static code analyzer [like Lint] for PHP files? -- I am looking at how to assess the content of PHP files before they are committed by developers.

6条回答
  •  隐瞒了意图╮
    2021-02-05 02:37

    You might want to combine phpcs (to adhere to coding standards) and a new project by Sebastian Bergmann: https://github.com/sebastianbergmann/hphpa This utilizes the static compiler by facebook to check for errors such as your looking for... Might be too much as a pre commit hook, but a hook into your build system might suffice?

提交回复
热议问题