Commit Graph

482 Commits

Author SHA1 Message Date
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
Martin Grenfell
d046f8e920 update changelog and credits 2011-12-01 17:59:59 +00:00
Martin Grenfell
319b8f2cb8 shift all the c helper functions into their own autoload lib file
This is mainly just for namespacing purposes and to set a pattern for
future helper lib functions.
2011-11-30 22:13:16 +00:00
Martin Grenfell
f2b9d24e95 add README 2011-11-30 20:56:43 +00:00
Martin Grenfell
0ae7112d50 remove the Rakefile - pathogen will be promoted from now on 2011-11-30 20:07:05 +00:00
Martin Grenfell
aa67390bd6 make syntastic more active by default
Enable more of the features by default while avoiding some of the more
intrusive ones.

Update the doc to reflect this.
2011-11-30 19:56:27 +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
Martin Grenfell
6b23d638b4 update the doc
some work still needs to be done here
2011-11-30 19:23:00 +00:00
Martin Grenfell
fc6e785a4e sass: remove the bufnr hacks and ignore some irrelevant output
We dont need to manually hack the bufnr for each entry in the loc list
since that the error output includes a file name.

Ignore the last line of the error message since it seems to always just
be "use --trace for a backtrace"
2011-11-29 09:16:40 +00:00
Martin Grenfell
4fbec5fdbd move the scss checker out of the sass checker
Just load the sass checker and call off to that - dont duplicate the
code as it previously was.
2011-11-29 09:11:08 +00:00
Martin Grenfell
31d3a7d619 trivial cosmetic code fix 2011-11-29 08:44:51 +00:00
Martin Grenfell
5c0dbc5d05 init the components of syntastic_mode_map separately
this allows the user to skip components in their own definition
2011-11-29 08:44:09 +00:00
Martin Grenfell
295f7a5d29 shift the :command definitions to a common place - to be tidy
Previously they were with their associated functions, but better to have
them all in one place.
2011-11-29 08:38:28 +00:00
Martin Grenfell
47147aad17 remove the old code to disable/enable filetypes
This system has been superseded by the new mode map code. If requested
in future, some code may be added to manipulate the active/passive types
in the mode map at runtime to provide the same functionality.
2011-11-29 08:36:42 +00:00
Martin Grenfell
78fbd7fa13 add g:syntastic_mode_map option
This option will allow users to fine tune when automatic syntax checking
is done.

The option should be set to something like:

let g:syntastic_mode_map = { 'mode': 'active',
                           \ 'active_filetypes': [],
                           \ 'passive_filetypes': ['puppet'] }

g:syntastic_mode_map['mode'] can take one of 2 values - "active" or
"passive". When set to active, syntastic does automatic checking as
usual. When set to "passive" syntastic only checks when the user calls
:SyntasticCheck.

The exceptions to these rules are defined in "active_filetypes"
"passive_filetypes". In passive mode, automatic checks are still done
for all filetypes in the "active_filetypes" array. In active mode,
automatic checks are not done for any filetypes in the
"passive_filetypes" array.
2011-11-28 23:44:40 +00:00
Martin Grenfell
e7b8375dec Merge remote-tracking branch 'justone/add_one_time_check' 2011-11-28 23:41:53 +00:00