[owncloud-devel] Test your app for deprecated code

Joas Schilling nickvergessen at owncloud.com
Mon Jul 20 08:19:39 GMT 2015


Hi there developers,

today we merged a code checker that allows you to test your app for 
deprecated usages, starting from 8.2 (current master) on:

occ app:check-code

Now checks for everything: private classes (e.g. OC\* and OC_*), 
deprecated classes (e.g. \OCP\DB) and strong comparisons (=== should be 
used instead of ==)

If you only want to use one of the checkers, you can do so by adding the 
-c parameter with the name:

-c private

-c deprecation

-c strong-comparison


You can also add multiple checks to one call:

occ app:check-code -c deprecation -c strong-comparison

One last note: due to the way the checker works, method calls might not 
be shown correctly, when the method is called on an object (non-static). 
We still try to find a way for this case, but that shouldn't block 
fixing all the cases it catches correctly.

I hope it helps you to keep your apps up to date.

cheers nickv



More information about the Devel mailing list