Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Content With Style:
Quick lint check on changed php files with svn st and xargs
Oct 20, 2009 @ 13:27:24

On the Content with Style blog, there's a "quickie" you can drop into a subversion hook as a part of your check-in that will run the lint command on only the changed files (not your entire repository).

If you haven't done it in a hook already, here's the quick way to check all your changed files for syntax errors.

This sort of command would be the most useful in a pre-commit hook to ensure that everything passes correctly. Their example only looks for ".php" files, but can be modified easily if you happen to use ".html" or another custom extension for your pages too.

tagged: lint check svn xargs changed

Link:


Trending Topics: