Commit Graph

25 Commits

Author SHA1 Message Date
Martin Grenfell
62fb4e70e4 php: set error_reporting=E_ALL
setting it to E_PARSE causes some errors to be missed - e.g.

`$a[$b][] $c;`

will not cause an error to get reported as this is classed as a compile
error, not a parse error.

This should fix #206.
2012-03-27 09:41:50 +01:00
Martin Grenfell
892cc2c232 refactor the error highlighting system
* remove the public SyntasticHighlightErrors() function
* shift the above code into s:HighlightErrors(). This is called
  automatically if g:syntastic_enable_highlighting is set
* to get the highlight regex we just look for a function called
  Syntastic_<filetype>_GetHighlightRegex
* to force this function to be called, each error item must have the
  'force_highlight_callback' key set

This code has one important functional change: now errors are *always*
highlighted if possible whereas previously they were only highlighted if
a call to SyntasticHighlightErrors was made.
2012-03-02 10:05:15 +00:00
Martin Grenfell
1f91303cdc php: prevent error duplication
Turn off `display_errors` and empty the `error_log` option so that
errors are guaranteed to be output to stdout

See #186 for discussion.
2012-03-02 09:27:10 +00:00
Artem Nezvigin
c5616d282f php is now forced to display parse errors, even in production environments 2012-02-22 12:43:42 -08:00
Matt Butcher
51a9e96e20 Per #158 (and #155): Turning empty() check back on. 2012-02-07 09:58:00 -06:00
Matt Butcher
8df5c3bcdc Added support for error/warning subtyping. 2012-01-27 13:43:48 -06:00
AD7six
7fedd203e7 only run phpcs if the file has no syntax errors.
running phpcs on a file which contains a parse error generates a huge
number of warnings from the phpcs library. This can freeze vim for
minutes at a time while it attempts to parse these
notices/warnings/errors.

Therefore - don't run phpcs on files which have parse errors.
2012-01-25 12:28:54 +01:00
Andy Dawson
4b68c72506 Use the default coding standard which phpcs is configured to use
see http://pear.php.net/manual/en/package.php.php-codesniffer.config-options.php#package.php.php-codesniffer.config-options.php-codesniffer.default-standard
2012-01-16 15:11:20 +01:00
Matt Butcher
e3c2b95b94 Added default setting to php.vim.
Changed the default standard to Zend, which is the most forgiving
of the out-of-the-box syntaxes.
2011-12-13 10:20:07 -06:00
Martin Grenfell
3defb627a5 php checker: add an option to disable phpcs 2011-12-07 14:13:18 +00:00
Martin Grenfell
6b6e2d1d37 php checker: ignore the csv headers in the phpcs errorformat 2011-12-07 14:03:57 +00:00
Martin Grenfell
e0ec1a3318 refactor the php checker
* move the phpcs code into its own function
* just use g:syntastic_phpcs_conf instead of initing a local var every
  time the checker is invoked
2011-12-07 14:03:57 +00:00
Matt Butcher
b21ddb5283 Added g:syntastic_phpcs_conf to allow phpcs flags.
PHPCS has a wide variety of commandline flags, including
support for various syntaxes. These must be configurable,
otherwise phpcs generates a high number of spurious errors for
code written to any standard other than the PEAR standard.
2011-12-07 14:03:57 +00:00
Martin Grenfell
965b3b7203 move the highlighting/balloon code into the main plugin file
In future I may move most of the code out into an autoload file, but in
the meantime I want all the code tidy and in one place for the next
release
2011-11-30 19:23:31 +00:00
Klein Florian
22fedb5350 added phpcs support 2011-10-28 11:35:03 +02:00
Konstantin Stepanov
30a579c04e highlight php errors 2011-05-03 15:37:30 +03:00
Jeremy Cantrell
c61890f1b7 Properly escape % for makeprg 2010-09-24 10:48:49 +08:00
kongo2002
2679a8ce6a fix php errorformat 2010-09-24 09:18:23 +12:00
marty
a4b0399e22 parse php "fatal errors" properly 2010-07-27 15:02:39 +12:00
marty
7ed510560e fix broken php checker 2010-07-27 15:02:39 +12:00
marty
5ad3cd67c1 change my email to gmail, hotmail licks ass crack 2009-12-16 23:02:36 +13:00
Martin Grenfell
e9c992da05 dont run php code through tidy for now
need to figure out how to make tidy play nicely with the php sections
...  not sure if its even possible
2009-07-16 22:54:10 +12:00
Martin Grenfell
1adfa4db5c make the syntax checkers use SyntasticMake 2009-07-15 21:29:28 +12:00
Martin Grenfell
0d7309330d run php files through tidy as well 2009-07-15 20:49:05 +12:00
Martin Grenfell
f5c6f22094 add php syntax checker 2009-07-15 13:57:18 +12:00