Home / Section index
 www.icosaedro.it 

 Using TextPad with PHPLint

TextPad® (http://textpad.com) can be easily configure to work with PHPLint. The result is a minimalistic IDE that integrates a good text editor along with the PHPLint validator. The figure below illustrates the result:


TextPad main window (click to enlarge), with the source program under editing (above) and the result of the validation performed by PHPLint (below). Double-clicking an error, the cursor gets positioned on the interested line of the source.


In order to obtain this result, the TextPad program must be configured properly. Select the Configure, Preferences... menu option and then the Tool node, and add a new external command named PHPLint and save: a new entry named "PHPLint" is added below the Tools node. Clik over this new entry to open the configuration specific to this new command as shown in the image below:


Configuration for the new command "PHPLint".


You must enter the full path of the PHPLint executable program, then the list of the parameters, in my case:

--modules-path C:\Users\Umberto\Desktop\Projects\phplint-windows-1.0_20110223\modules --print-path relative $File

Also note the regular expression that parses the error messages raised by PHPLint, matching the file name and the line number from each message:

^\(..[^:]+\):\([0-9]+\):

That's all!


Umberto Salsi
Contact
Site map
Home / Section index