Commit Graph

233 Commits

Author SHA1 Message Date
LCD 47
f623d1ea05 Workaround for a Vim crash.
Older versions of Vim can crash if redraw is called while a popup is
visible.  This commit adds a variable g:syntastic_delayed_redraws that
instructs syntastic to move redraws to a CursorHold / CursorHoldI
handler if redraw is called while pumvisible() is true.
2013-10-29 09:09:34 +02:00
LCD 47
ccef916d48 More magic / nomagic fun. 2013-10-25 15:56:09 +03:00
LCD 47
95aab2530e Try to avoid fun with magic / nomagic by qualifying regexps. 2013-10-25 15:46:16 +03:00
LCD 47
d238665385 Fix unwanted filter() and map() side effects. Minor cleanup. 2013-10-23 12:59:23 +03:00
LCD 47
bedf88c184 Cleanup parsing versions. 2013-09-24 08:39:07 +03:00
LCD 47
1541e3092e Merge branch 'master' into gcc_refactor 2013-08-15 07:44:40 +03:00
LCD 47
7550c86016 Leftover from 7eda5de. How embarrasing. 2013-08-13 09:01:04 +03:00
LCD 47
9b3eab1cb9 Merge branch 'master' into gcc_refactor 2013-08-10 09:03:23 +03:00
LCD 47
05dea5febe Fix shell escaping. 2013-08-02 11:06:48 +03:00
LCD 47
65dbfa0895 Fix checkstyle error levels. Closes #709. 2013-08-01 18:35:08 +03:00
LCD 47
9913819255 Merge branch 'fix_checkstyle' into preprocess 2013-08-01 18:03:01 +03:00
LCD 47
cc5ecf2bdb Replace lmake with equivalent system + lgetexpr.
It's now possible to deal with \0 characters in checkers' output.
Shell escaping is saner and safer.
SyntasticMake() has a new option 'preprocess'.
Checkers html/validator and eruby/ruby now use the new preprocess
option.  Auxilliary script validator_decode.awk is no longer needed.
2013-08-01 13:40:29 +03:00
LCD 47
77004ad0cb Merge branch 'master' into gcc_refactor 2013-07-30 23:19:03 +03:00
MasterLambaster
0f5363f6d2 Ruby header file detection should work with all ruby versions
* Config module generates warning in ruby >= 1.9 that generates error
* Ruby >= 1.9 have different header file config name
2013-07-29 23:38:16 +03:00
LCD 47
8aafac34d2 Cleanup. 2013-07-12 08:11:20 +03:00
LCD 47
dce4c76c21 Merge branch 'master' into gcc_refactor 2013-07-12 08:09:33 +03:00
LCD 47
8c05dbf16e A first attempt at checking the exit code from the checkers. 2013-07-12 08:08:41 +03:00
LCD 47
6bff80366a Merge branch 'master' into gcc_refactor 2013-07-10 11:21:22 +03:00
LCD 47
f4ccd312ee More shell escaping bugs. 2013-07-10 11:20:54 +03:00
LCD 47
a4a6dd6fcf Merge branch 'master' into gcc_refactor 2013-07-10 10:31:41 +03:00
LCD 47
a1e1108c8e Fix a bug related to shell escaping. 2013-07-10 10:30:41 +03:00
LCD 47
fd01b9091d Merge branch 'master' into gcc_refactor 2013-07-06 09:23:46 +03:00
Thomas Holmes
2d537305f6 Refactor FindInParent from haxe.vim to be a util function 2013-07-05 17:12:06 -04:00
LCD 47
fa961edac6 Merge branch 'master' into gcc_refactor 2013-07-04 21:30:52 +03:00
LCD 47
6ba8e651cb Make shell escaping less produce fewer useless quotes.
Function inspired by tpope's vim-dispatch.
2013-07-04 21:04:20 +03:00
LCD 47
6cc0ed4003 Make checkstyle aware of message priorities.
Known bug: this breaks if the name of the file being checked contain one
of the characters <, >, ', ", &.
2013-06-28 21:24:38 +03:00
LCD 47
f641f68683 More refactoring: add s:GetCflags(). 2013-06-28 20:25:17 +03:00
LCD 47
3e4501c1ff More refactoring: add s:GetCheckerVar(). 2013-06-25 09:59:07 +03:00
LCD 47
907ef20e3c New preprocess function "filterForeignErrors". Cleanup. 2013-06-24 11:46:27 +03:00
LCD 47
f9c30c3215 Use default includes only with the C-like checkers. 2013-06-21 11:42:14 +03:00
LCD 47
ff2b615093 Merge branch 'master' into gcc_refactor 2013-06-17 14:02:44 +03:00
LCD 47
af9d6f627b Print a message if no active checkers are found. 2013-06-15 07:36:20 +03:00
LCD 47
4284fbf522 Merge branch 'master' into gcc_refactor 2013-06-10 23:25:21 +03:00
LCD 47
6574872b55 Preserve order in checker lists. Fixes #684.
Keep order from g:syntastic_[filetype]_checkers and s:defaultCheckers in
getActiveCheckers().  Keep order in syntastic#util#unique().
2013-06-10 23:14:59 +03:00
LCD 47
c5aa22f4e4 Remove leading and trailing spaces when reading C config files. 2013-06-08 11:33:18 +03:00
LCD 47
45f9e93b00 Bug fix: proper escaping in config files. 2013-06-08 11:09:39 +03:00
LCD 47
b6f6abba86 Merge branch master. 2013-06-07 21:18:29 +03:00
LCD 47
d3d4ff3935 Merge branch 'master' into gcc_refactor 2013-06-06 11:10:10 +03:00
LCD 47
31bed2d6cf Update description of syntastic#makeprg#build(). 2013-06-02 18:28:42 +03:00
LCD 47
63eceb6969 Merge branch 'master' into gcc_refactor 2013-05-31 21:15:55 +03:00
LCD 47
d3354f175c Make syntastic#makeprg#build() aware of filetypes. Fixes #667. 2013-05-31 21:05:45 +03:00
LCD 47
a8be73d113 Moved syntastic#gcc#GetLocList() to autoload/syntastic/c.vim. 2013-05-30 19:44:12 +03:00
LCD 47
4a6ece567a Merge branch 'master' into gcc_refactor 2013-05-30 19:29:12 +03:00
LCD 47
dd6e1c703b Relax parsing of version strings. 2013-05-29 09:55:42 +03:00
LCD 47
ea827bfa06 GCC refactor. 2013-05-21 10:03:04 +03:00
LCD 47
d8386c1211 Make compressWhitespace() handle embedded LFs. 2013-05-15 09:42:00 +03:00
LCD 47
68cfe6513b Cleanup. 2013-05-13 16:37:16 +03:00
LCD 47
cd289e45f0 Minor cleanup. 2013-05-13 10:59:13 +03:00
LCD 47
4ffa051137 Bug fix. 2013-05-10 16:44:47 +03:00
LCD 47
7319cb6a9e Postprocessing functions.
This patch adds an option 'postprocess' to SyntasticMake().  The value
of this option is a list of names.  Each name is translated to a
function syntastic#postprocess#name().  These functions are applied in
order to the list of errors just before SyntasticMake() returns.  They
take a single parameter, the list of errors, and are supposed to
returned the processed list.
2013-05-10 14:11:07 +03:00
LCD 47
901f19797c Remove a duplicate function. 2013-05-06 08:27:01 +03:00
LCD 47
408287de6f Cleanup.
Adds an option g:syntastic_xhtml_tidy_ignore_errors to xhtml/tidy.
Cosmetic code changes.
2013-04-15 11:21:52 +03:00
Martin Grenfell
49b6012f98 add basic deprecation warning system 2013-04-13 17:19:24 +01:00
Martin Grenfell
a9938e0afd Merge remote-tracking branch 'origin/notifiers'
Conflicts:
	autoload/syntastic/util.vim
2013-04-13 17:05:18 +01:00
Martin Grenfell
fbbb30295b add a simple debug message system
We may want to add debug messages at many points. We can add them as we
find we need them - i.e. when debugging stuff with users.
2013-04-13 16:51:23 +01:00
LCD 47
31b654301b Fix for #597.
If the first error in the location list refers to a file that isn't
loaded, entering the quickfix window would close it.

If `hidden` is set, `:quit`-ing the main file would not close the
quickfix window.
2013-04-09 18:20:14 +03:00
Martin Grenfell
dc3d80a204 more refactors to the Notifier classes
Move the autoloc list toggling out into its own notifier class.

Move the function that echos the error on the current line out into its
own notifier.

A few other changes were required in the process:
* move s:WideMsg() out into syntastic#util autoload lib so it is
  available from the cursor notifier.
* move s:ShowLocList() into the LocList class so it is available for
  the autoloclist notifier
* move s:HideLocList() into Loclist as a class method mainly to keep the
  two show/hide methods together
* move the s:old_line var into the Cursor notifier where it is needed
2013-04-07 23:06:02 +01:00
Christian Höltje
2f4fc38053 Renamed version check function
Moved the `SyntasticIsVersionAtLeast()` into `util.vim` as
`syntastic#util#versionIsAtLeast()` as per @scrooloose's suggestion.
2013-03-08 11:58:49 -05:00
Martin Grenfell
a66c19f731 move the MakeprgBuilder class in with the rest of the classes 2013-02-01 17:06:32 +00:00
Mathias Stearn
9b1326c216 Force case-sensitive matching in syntastic#c#ReadConfig
This makes it not match lines like:
-include some_header.h
2013-01-22 15:11:23 -05:00
Martin Grenfell
5b31495af2 update makeprg builder and update some checkers to use it
update makeprg builder:
* it now accepts `fname`, `tail`, and `post_args` params.
* add some doc above syntastic#makeprg#build
* update a bunch of checkers to use the new params

Still have quite a few checkers that arent using makeprg#build.
Including all c* and a few other c-like checkers. And PHP.

Not to worried about c* as these checkers are complicated and probably
justify having their own logic to build makeprgs.
2013-01-20 12:27:19 +00:00
Martin Grenfell
10c845d1f5 add a makeprg builder
The problem
---

Some people want to change the syntax checker args and/or executable.
Currently they have to create their own checker to do this.

Solution
---

Create a standard API for building a makeprg that allows users to set
global variables to override the exe or args.

This API is in use in the coffee and python/flake8 checkers - as
proofs of concept.

So, if the user wanted to change the args that get passed to `flake8`
they can now set `let g:syntastic_python_flake8_args="--foo --bar"` in
their vimrc. Similarly they could set `let
g:syntastic_python_flake8_exe='python foo.py'`
2013-01-02 13:05:27 +00:00
Martin Grenfell
7353b32d77 perl: add -Tc to makeprg if the shebang contains -T
If the shebang contains -T, then the makeprg looks like:
    perl '/path/to/efm_perl.pl' -c -w '/tmp/foo.pl' -Tc

Mods to syntastic#util#ParseMagicNumber
 * rename it to ParseShebang (since this name seems more common)
 * return an empty result set rather than 0 so callers dont have to
   check if empty()
2012-12-18 09:38:33 +00:00
Gregor Uhlenheuer
8540748d0c Merge pull request #425 from Fruneau/c-cpp-improvements
C/C++ improvements: clang support and default include exclusion
2012-12-16 12:53:42 -08:00
Martin Grenfell
3deec1d81a add syntastic#util#ParseMagicNumber()
this will (hopefully) be used in the perl checker to fix #422
2012-12-16 20:48:54 +00:00
Florent Bruneau
4b0b81cddc c/c++: add an option to ignore default include dirs.
Signed-off-by: Florent Bruneau <florent.bruneau@intersec.com>
2012-12-16 18:44:20 +01:00
Martin Grenfell
0765f97dd3 refactor out some duplication of /dev/null logic 2012-10-23 22:37:11 +01:00
kongo2002
42279e29f2 add output redirection to null device for C as well 2012-10-09 23:10:35 +02:00
Hong Xu
30d7462249 Remove some unnecessary win64 checks.
has('win32') is always true on Win64.
2012-05-08 20:31:20 +08:00
kongo2002
d8f3aa5d50 add ReadConfig() function for C/C++ checkers 2012-03-27 22:15:06 +02:00
kongo2002
adedb47ad7 refactoring of GetIncludeDirs() for C/C++ 2012-03-11 19:55:01 +01:00
kongo2002
8e2634ae7e add include directory functionality to cpp 2012-03-04 19:59:26 +01:00
Naoya INADA
a2e7ef08c0 Fix the error that occurs when using Python 3.x and written the '#include <Python.h>' in the .c file 2012-02-03 21:58:49 +09: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
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
f428139a0f remove custom highlights manually - not with matchclear()
Previously we were blowing away highlights that were added by other
plugins via matchadd(). To prevent this we now track all the ids of the
highlights groups we add and remove them explicitly with matchdelete().
2011-11-27 15:35:56 +00:00
kongo2002
fc4181c256 tweak autoload file 2011-09-09 21:36:36 +02:00
kongo2002
3d77ad2c4d move c/cpp syntax helper functions into autoload 2011-09-09 21:31:45 +02:00
Konstantin Stepanov
46d43a6913 errors highlighter: syntastic#HighlightErrors() third optional bool argument to force callback call
Normally if location item has "col" item, syntastic#HighlightErrors() handle it without callback
call for performance reason. But sometimes it's necessary to handle all items with callback
(like in new vala syntax checker), so third optional bool arg is added to the function.

If this argument exists and has true value, then callback function is called on *all*
location items, no matter is they have "col" element or not.
2011-07-10 15:42:09 +03:00
Konstantin Stepanov
0bd7218382 Issue #44 fixed 2011-05-27 00:44:55 +03:00
Konstantin Stepanov
0ee07cb95b highlight postprocessor fixes 2011-05-25 04:51:26 +03:00
Konstantin Stepanov
75afb52d7d general error highlighting function 2011-05-03 15:35:50 +03:00
Konstantin Stepanov
74f3bb0a93 balloons support 2011-05-03 02:21:16 +03:00