Commit Graph

2630 Commits

Author SHA1 Message Date
Martin Grenfell
f51ec67061 update change log and credits for next version 2011-12-12 23:44:45 +00:00
Martin Grenfell
394d129b55 refactor the javascript syntax checkers
The js syntax checker was 4 checkers stuffed into 1 file. Now it is
broken down so that each checker is in its own file inside
syntax_checkers/javascript/ while syntax_checkers/javascript.vim just
determines which file to source.

Change the names of the global js checker config variables so that
they all start with "syntastic_javascript_". This is purely for
namespacing.

Remove some unneeded logic around the config variables too. Not sure how
it got in there, but it was more confusing than helpful without offering
any benefits...
2011-12-11 22:54:33 +00:00
Martin Grenfell
8dba3fe0b5 less checker: update the error format for the latest version
I installed the latest version of lessc and they have modified their
output slightly. Update the errorformat for this.

Also, they new output is colorized by default. So I have added an option
to specify args to the checker that currently defaults to "--no-color".
This means that if people want to use an older version of lessc, they
will need to reset this option to an empty string.
2011-12-11 14:33:44 +00:00
Martin Grenfell
0af738a59a less checker: fix a syntax error
ironic?
2011-12-11 14:32:53 +00:00
Martin Grenfell
cafb55b3c8 fix a minor issue when echoing the current error
Only clear the cmd window when it is displaying a message that we
echoed. Previously we were echoing a blank line every time the cursor
moved - this was clearing messages generated from other sources than
syntastic.
2011-12-11 09:32:36 +00:00
Martin Grenfell
e24bd80f44 fix a strange bug when echoing error messages
In the javascript:jshint checker the error messages are being returned
with a newline prefixed to the front. I have tried to fix this in the
errorformat - but I cant see anything that would cause it.

Im not sure if this is a one-off thing, but strip out all new lines here
just in case.
2011-12-11 09:26:55 +00:00
Martin Grenfell
8491df95d6 move the main autocmd into the syntastic augroup 2011-12-10 01:18:20 +00:00
Martin Grenfell
8e6ebec56e echo the current error in the cmd win
This is largely taken from kevinw's pull request (#46).

Add the g:syntastic_echo_current_error option to deactivate the
functionality.
2011-12-10 01:15:24 +00:00
Martin Grenfell
cda718643c use custom highlight groups instead of tracking match ids
Use SyntasticWarning and SyntasticError highlight groups when calling
matchadd(). This makes it trivial to clear all of our highlights without
having to store IDs.

Stole this code from kevinw's pull request (#46)
2011-12-10 00:18:28 +00:00
Martin Grenfell
a7f5428aaa remove -nargs=0 from the :commands since this is the default 2011-12-09 23:49:21 +00:00
Martin Grenfell
9f9fbbb5ff Merge pull request #116 from zhaocai/master
add applescript syntax_checker
2011-12-09 15:14:43 -08:00
Zhao Cai
6a7529713b 0.2.1 - remove g:syntastic_applescript_tempfile. use tempname() instead. 2011-12-09 13:11:45 -05:00
Zhao Cai
2302f12367 add applescript syntax_checker 2011-12-09 10:32:39 -05:00
Martin Grenfell
da78242123 add an option to SyntasticMake to specify defaults
Many of the syntax checkers were setting the 'bufnr' key for each
error manually and one was setting 'text' if it didnt exist too.

Add the 'defaults' option to SyntasticMake to set default values in the
returned error list - it only sets values if they are empty.
2011-12-09 13:47:42 +00:00
Martin Grenfell
5ca3202474 Merge pull request #115 from millermedeiros/iss-sign
balloon_eval is already being checked at the top. see #114
2011-12-09 05:36:02 -08:00
millermedeiros
90e76649f9 balloon_eval is already being checked at the top. see #114 2011-12-09 11:31:10 -02:00
Martin Grenfell
4b563fa795 Merge pull request #114 from millermedeiros/iss-sign
safe-guard against signs/balloons user settings
2011-12-09 05:08:06 -08:00
millermedeiros
c95cf15823 safe-guard against signs/balloons user settings when these features aren't available. see #113 2011-12-09 10:57:28 -02:00
Martin Grenfell
8ca2028f3e javascript checker: make jshint 0.5.3 work 2011-12-09 12:40:42 +00:00
Martin Grenfell
a97b9eaba8 Merge pull request #81 from millermedeiros/master
improve support for HTML5 attributes
2011-12-08 23:40:55 -08:00
Martin Grenfell
898981865f fix a typo in the doc 2011-12-08 22:24:07 +00:00
Martin Grenfell
7d8b7b3157 add an option to disable error highlighting 2011-12-08 22:23:51 +00:00
Martin Grenfell
bb9c87383f rearrange and comment some functions
Move 2 functions further up syntastic.vim so that all public functions
are at the bottom - purely to be tidy.

Stick some comments on functions - most functions now have at least a
one liner explaining them.

Also, rename a variable in SyntasticHighlightErrors (since I had to look
at the log to figure out what it was).
2011-12-08 20:49:24 +00:00
Martin Grenfell
70166f4ac6 javascript checker: make the jslint checker work again
Add a highlight function too.
2011-12-08 20:24:54 +00:00
Matt Butcher
7db6cddd16 Merge branch 'master' of git://github.com/scrooloose/syntastic
Conflicts:
	syntax_checkers/php.vim
2011-12-07 09:16:25 -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
b96617994b Merge pull request #113 from millermedeiros/iss-sign
sign throwing error during open on terminal
2011-12-07 05:32:27 -08:00
millermedeiros
75a5b9abfe better check for balloons as well, not throwing error but no need to call RefresBalloons if it isn't supported. 2011-12-07 11:26:19 -02:00
millermedeiros
8afc49dc68 Merge branch 'master' of https://github.com/millermedeiros/syntastic
* 'master' of https://github.com/millermedeiros/syntastic:
  filter HTML5 warnings without using grep. see #53. see #81.
  improve support for HTML5 attributes and refactor html.vim logic to allow adding new grep rules easily. see #53
2011-12-07 11:17:12 -02:00
millermedeiros
2a88c6f219 fix error thrown while opening vim on a environment that doesn't support signs. 2011-12-07 11:16:11 -02:00
millermedeiros
6982c38b88 filter HTML5 warnings without using grep. see #53. see #81. 2011-12-07 11:14:18 -02:00
millermedeiros
10c0c34d80 improve support for HTML5 attributes and refactor html.vim logic to allow adding new grep rules easily. see #53 2011-12-07 11:14:18 -02:00
Matt Butcher
b70a51f729 Added global disabling of phpcs.
PHPCS is a highly opinionated coding convention checker. It
reports conventional mistakes as syntax errors, and can be very
confusing (or just annoying). So I have added the option to
turn it off, while still getting the "real" syntax errors from
php's linter.
2011-12-06 22:06:00 -06:00
Matt Butcher
966cb23527 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-06 17:25:40 -06:00
Martin Grenfell
1ce4d31930 fix a bug with the sh checker 2011-12-05 15:07:22 +00:00
Martin Grenfell
ae9f45cf4a fix a small bug with the sh syntax checker and refactor
Previously, if we edited a new bash script then we would have to wipeout
the buffer and recreate it to get syntastic to recognise it as a bash
script. This is because it parsed out a magic number and cached that -
and it trivially fails to find a magic number when you create a new
file.

So recheck for a magic number if it is currently empty.

Also, do a small refactor.
2011-12-04 02:28:21 +00:00
Martin Grenfell
ea7d9779f0 update the gjslint javascript checker
This was missing errors like this:

/tmp/foo.js:1:(-002) Error parsing file at token ")". Unable to check the rest of file.

The reason is because of the minus sign in front of the 002. It is using
%m to match that, which appears to only match positive numbers - so just
ignore the minus sign.
2011-12-04 02:14:24 +00:00
Martin Grenfell
62ef08d334 make a fix to the coffee checker
This is in response to #88 where errors like this were getting missed:

SyntaxError: In simpleMapComponent.js.coffee, Reserved word "function" on line 10
 at SyntaxError (unknown source)
 at Lexer.identifierError (/usr/lib/node_modules/coffee-script/lib/lexer.js:458:13)
 at Lexer.identifierToken (/usr/lib/node_modules/coffee-script/lib/lexer.js:80:16)
 at Lexer.tokenize (/usr/lib/node_modules/coffee-script/lib/lexer.js:31:19)
 at Object.compile (/usr/lib/node_modules/coffee-script/lib/coffee-script.js:29:34)
 at /usr/lib/node_modules/coffee-script/lib/command.js:149:33
 at /usr/lib/node_modules/coffee-script/lib/command.js:115:26
 at [object Object].<anonymous> (fs.js:107:5)
 at [object Object].emit (events.js:61:17)
 at afterRead (fs.js:878:12)

To fix this I have added another error matcher on the front of the
errorformat and have made a fix to the %-G matcher on the end (i.e. it
wasnt actually matching anything before).

The errorformat may need more updating.
2011-12-04 01:40:12 +00:00
Martin Grenfell
af83357512 fix a bug with error highlighting
Store error highlight IDs on a per window basis rather than per buffer.

This is needed as matchadd() adds highlights to the current window - not
buffer. This meant an error would occur when you open a file, create an
error that caused a highlight, then open the same file in a different
window - because it would call matchdelete() with an id that wasnt
defined for the current window.
2011-12-04 00:45:07 +00:00
Martin Grenfell
975315c665 fix a bug where balloons werent being removed
Remove balloons on every refresh so they dont get left there if all
errors are fixed on the next refresh.

NO ONE LIEKS ZEE STALE BALLOONS!
2011-12-04 00:45:07 +00:00
Martin Grenfell
c535a677ac Merge pull request #111 from bregenspan/master
Tiny addition to documentation re: Helptags
2011-12-02 15:13:10 -08:00
Ben Regenspan
5954b5e5df tiny documentation addition re: generating helptags 2011-12-02 17:14:40 -05:00
Martin Grenfell
092c7cdb19 fix for erlang syntax checker
dont hardcode the path of the checking script
2011-12-02 10:38:11 +00:00
Martin Grenfell
4ee40b271e fix a bug that was occurring with balloons
Don't try to display balloons when no errors were detected. Refactor the
ballon refresh code out into its own function.
2011-12-02 09:53:49 +00:00
Martin Grenfell
5d479552f3 fix a syntax error with the SyntasticCheck command 2011-12-02 09:36:11 +00:00
millermedeiros
d2250151f0 filter HTML5 warnings without using grep. see #53. see #81. 2011-12-02 00:41:03 -02:00
Martin Grenfell
45c77595c9 update the header comments for version 2.0.0 2011-12-02 00:27:14 +00:00