I have an svn server that I checkout the repository in my computer.
The main repositiry has about 2k files
I have made changes to lots of files (mainly php) and I want to make sure they are all valid before I commit.
svn commit -m "i fix the bug #293"
How can I check all the files at once to make sure they are valid and no php errors so I dont have to manually check all these files.
This bash oneliner will the modified php files and filter the ones that have no syntax errors:
for i in $(svn status | grep -v ^? | grep php | awk '{print $2}') ; do php -l $i ; done | grep 'Parse error'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With