D22062: Addition of php script output patterns. Initial development.

Santiago Capel Torres noreply at phabricator.kde.org
Mon Jun 24 05:48:20 BST 2019

santilin added a comment.

  This patch adds some patterns to ScriptErrorFilterStrategy to handle some PHP errors so that you can click on the message and the matching file is opened.
  Some comments:
  - Shouldn't the patterns be added by the kdevelop-php plugin
  - I needed to know the script working dir in order to handle relative paths. I have hacked it reusing the d->m_buildDir member of OutputModel, but there might be another solution.
  - I am not confident that my usage of QDir, QUrl and QFileInfo are the best ones, but the way I have coded it works.
  - Probably, the ScriptErrorFilterStrategy::scriptDir member should be moved to a new ScriptErrorFilterStrategyPrivate class to mimic the structure of CompilerErrorFilterStrategy (if needed at all)
  - I wonder if testing for empty lines (or shorter than a given lenght) to avoid checking the patterns would be an improvement
  - I've set all the items as Informative when there is a match, so I only need to set indicators for error and warnings

  R32 KDevelop


To: santilin
Cc: kdevelop-devel, hmitonneau, christiant, glebaccon, domson, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190624/fde12c48/attachment.html>

More information about the KDevelop-devel mailing list