Edit report at https://bugs.php.net/bug.php?id=64184&edit=1

 ID:                 64184
 Updated by:         ras...@php.net
 Reported by:        andyearnshaw at gmail dot com
 Summary:            Enhance the -l (Lint) command line option
-Status:             Open
+Status:             Wont fix
 Type:               Feature/Change Request
 Package:            *General Issues
 Operating System:   Any
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

That would require writing a static analyzer which is outside our scope at this 
point. Right now it simply runs the compile-phase and none of the things you 
are 
asking for can be done by the compiler. The executor can do some of this, but 
not 
without actually executing the script, which you don't want. The closest thing 
to 
a full static analyzer is Facebook's HipHop project if you run it in 
analyze-only 
mode.


Previous Comments:
------------------------------------------------------------------------
[2013-02-10 13:27:23] andyearnshaw at gmail dot com

Description:
------------
It would be great if the command line -l option could be enhanced to do more 
than 
just syntax checking.  It would be infinitely more useful if it could also 
output 
warnings for the following:

 - Use of deprecated functions
 - Correct number of function arguments
 - Other useful warnings (creating default object from empty value, etc)
 - Optionally, best practices

This would make it more akin to the JavaScript linters available, with the 
added 
benefit of always being relevant to the version of PHP installed.



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64184&edit=1

Reply via email to