Commit Graph

27 Commits

Author SHA1 Message Date
LCD 47
bedf88c184 Cleanup parsing versions. 2013-09-24 08:39:07 +03:00
LCD 47
c0f349a4b2 Pylint checker again: calling syntastic#util#parseVersion() is wrong. 2013-09-23 23:29:10 +03:00
LCD 47
8965bd141b Safer version check for pylint. 2013-09-23 23:14:46 +03:00
LCD 47
3eb51f1e26 Cleaner error handling for pylint. 2013-09-20 07:49:19 +03:00
LCD 47
8805b83654 Add safety guard for pylint. 2013-09-20 01:16:36 +03:00
LCD 47
e4a966a517 Pylint: ignore informational messages. 2013-08-12 11:22:12 +03:00
LCD 47
755ecfe46b Catch up with the latest pylint contortions. 2013-08-07 12:01:45 +03:00
LCD 47
d3354f175c Make syntastic#makeprg#build() aware of filetypes. Fixes #667. 2013-05-31 21:05:45 +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
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
LCD 47
bd2d5e37ed Error format fix for pylint. 2013-04-10 11:48:17 +03:00
Martin Grenfell
16424e5761 add guards to all checkers
goddamn I love macros
2013-02-21 15:50:41 +00:00
LCD 47
b33e37470f Output from pylint should be sorted. 2013-02-06 16:27:49 +02:00
LCD 47
f5dc5b1ad4 Off by one error, sorry. :( 2013-02-06 15:48:58 +02:00
LCD 47
b53072bee0 Munge the output of pylint in Vim rather than relying on sed(1). 2013-02-06 15:29:56 +02:00
Martin Grenfell
e0b8e87c93 refactor all the syntax checkers to use the new API and dir layout 2013-01-27 20:08:30 +00:00
Martin Grenfell
58ba8d3161 refactor how we represent and store checkers using python as a demo
Add 2 classes: SyntasticChecker and SyntasticRegistry.

SyntasticChecker represents a checker. It holds funcrefs to the checker
func, the highlight regex func and a new `isAvailable()` func (that
essentially just checks if the checker exe is installed)

SyntasticRegistry is responsible for:
* loading checkers
* storing checkers
* fetching the checkers to use according to availability and the users
  settings

Motivation/benefits:
* in the current system only one checker can be loaded per filetype
* syntax checkers cant be "chained" together
* the system is hard to add features to since fundamental concepts like
  syntax checkers and location lists arent represented explicitly

Things left to do:
* add a call to g:SyntasticRegistry.CreateAndRegisterChecker() to all
  checkers
* add an `isAvailable` function to all checkers
* move all checkers into `syntax_checkers/filetype/checkername.vim` -
  g:SyntasticRegistry assumes this layout, and its a good idea anyway
  for consistency and it makes it easier for users to add their own
  checkers

Things to do after all of the above:
* add a LocationList class and move all the filtering functions onto it
* possibly add an Error class that wraps up each item in a loc list

Random notes:
* with the new system you can select the checkers to use with e.g.
    `let g:syntastic_python_checkers=['flake8', 'pylint']`
  This will try flake8 first, and if no errors are detected it will move
  onto pylint.
2013-01-24 00:19:13 +00: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
6a184f0e37 update checkers to use the new syntastic#makeprg#build()
Make all the easy updates. There are still quite a few to do, but in
doing these ones I can see that syntastic#makeprg#build() needs to
accept a few more options. Namely:

* "postargs" that appear after the filename
* "tail" that appears after everything - used for things like
  redirecting output and piping to grep/sed/etc
* the filename itself - only the java checkers needed this since they
  specify the directory of the file to check as well

There are still a few other things to do as well:

* remove the options from the checkers that are now provided by
  syntastic#makeprg#build implicitly - i.e. the checker exe and args.
* also, we need to doc the above implicit checker options
2013-01-20 11:13:01 +00:00
Adam Coddington
89e22ba2d4 Modifying pylint checker such that it displays both the original pylint error code as well as translating said error codes into syntastic-compatible Error and Warning messages. 2012-06-27 10:21:43 -07:00
James Polley
7cd8efec70 Fixes #202 - redict stderr in a way that doesn't break on versions of
bash <4.0
2012-03-24 19:18:08 +11:00
Martin Grenfell
5be83cdcc7 Merge pull request #201 from bukzor/master
redirect pylint stderr
2012-03-20 04:27:52 -07:00
Li He
a9383527d6 python/pylint: add g:syntastic_python_checker_args
I borrow this from flake8.
2012-03-20 11:21:08 +00:00
Buck Golemon
1a91488451 prevent stderr from messing up the terminal, in the (usual) case of no pylintrc found 2012-03-12 12:15:51 -07:00
Buck Golemon
c039b0f128 fix pylint parsing 2012-03-11 22:04:47 -07:00
Parantapa Bhattacharya
760d84588e Fix pylint error format string
Used the error format string from sashahart/pylint.vim which seems
to be much more comprehensive.
2012-03-04 13:03:09 +05:30
Martin Grenfell
d454a00615 split python checker out into 3 files
previously there were 3 checkers in the one file
2012-02-20 10:20:48 +00:00