Commit Graph

62 Commits

Author SHA1 Message Date
LCD 47
7b36f9147f More detailed debugging.
Moved logging functions to autoload/syntastic/log.vim.
Cleanup debug functions.
Add a function to dump option variables.
2013-11-14 10:13:05 +02:00
LCD 47
71ad20e184 More typos. 2013-11-08 10:45:15 +02:00
LCD 47
fd5a52e0bd Cleanup. 2013-11-04 23:00:51 +02:00
LCD 47
6d81ac5dd0 Registry cleanup, stage 3.
Make syntastic#makeprg#build() a dictionary function.
Remove the mandatory checker argument to syntastic#makeprg#build().
2013-11-02 10:44:06 +02:00
LCD 47
3694908d05 Registry cleanup, stage 2.
(1) Checkers now have an _exec attribute, and an accessor getExec().
(2) CreateAndRegisterChecker() initializes _exec from an optional argument
'exec'.  If this argument is missing, 'name' is used instead.
(3) Functions SyntaxCheckers_*_IsAvailable() are now dictionary functions.
(4) Functions SyntaxCheckers_*_IsAvailable() are now optional.  When
they are missing, they are assumed to return executable(expand(self.getExec())).
(5) Argument 'exe' of function syntastic#makeprg#build() is now optional.
If this argument is missing, expand(self.getExec()) is used to set checker
executables.
2013-11-02 10:44:06 +02:00
LCD 47
28bce98a68 Registry cleanup, stage 1.
Make SyntaxCheckers_*_GetLocList() dictionary functions.
Pass a reference to the current checker to syntastic#makeprg#build().
Add an optional 'redirect' argument to CreateAndRegisterChecker().
Change the sh checker to use the new dictionary functions.
Add a new registry method getLocListRaw() (needed for the sh checker).
2013-11-02 10:44:06 +02:00
LCD 47
cd1d1a2a55 Cleanup. 2013-11-01 11:51:04 +02:00
LCD 47
2fbd870a20 Deal with more pylint versioning creativity. 2013-10-08 18:24:14 +03:00
LCD 47
237ebeadb2 Fix pylint version parsing on Windows. 2013-09-25 13:08:50 +03:00
LCD 47
f79e9d2eda Minor cleanup. 2013-09-24 21:43:12 +03:00
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
56864a328c Tune flake8 error levels. 2013-09-20 01:45:58 +03:00
LCD 47
8805b83654 Add safety guard for pylint. 2013-09-20 01:16:36 +03:00
LCD 47
3a03fee48c Adjust for newer weirdness in the python/pylama checker. 2013-08-16 09:14:52 +03:00
LCD 47
7dba68cffb Cleanup the python/pep257 checker. 2013-08-16 01:36:40 +03:00
Marc Bryan
40229b1255 Add pep257 Python syntax_checker 2013-08-15 11:41:49 -06: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
ba0f349dbf Pylama: pep8, pep257, and mccabe are style checkers. 2013-07-15 11:24:41 +03:00
LCD 47
4b9bf4405b Pylama: new checker for Python 2.
Minor refactoring.
2013-07-14 19:13:18 +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
d3354f175c Make syntastic#makeprg#build() aware of filetypes. Fixes #667. 2013-05-31 21:05:45 +03:00
Martin Grenfell
602bbe7b24 break down some error format strings
Most errorformats are now expressed 1 "clause" per line.
2013-05-14 17:36:20 +01: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
17d49a8db6 Added pep8 checker for Python. 2013-05-05 08:54:03 +03:00
Liam Curry
1653093baa Added py3kwarn checker 2013-04-15 17:15:49 -04: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
51001b66de Typo. 2013-04-12 13:29:47 +03:00
LCD 47
4604c97f06 Rework of the python checker. 2013-04-12 13:14:07 +03:00
LCD 47
bd2d5e37ed Error format fix for pylint. 2013-04-10 11:48:17 +03:00
Martin Grenfell
073eae9884 Revert "python/flake8: add some backwards compat"
This reverts commit 0ef513a0a8.

The cases that I was trying to catch here were already caught further
along in the errorformat
2013-03-18 10:49:39 +00:00
Martin Grenfell
0ef513a0a8 python/flake8: add some backwards compat
make it match E and W for flake < 2.0
2013-03-18 09:42:22 +00:00
Chronial
1315a85aee recognize flake8 2.0 error output 2013-03-17 12:13:39 +01:00
Martin Grenfell
2003c772b0 Merge pull request #465 from chazlever/master
Fix Flake8 Error/Warning Parsing
2013-03-08 07:10:55 -08: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
Chaz Lever
50561a87f7 Fix flake8 error/warning checking
Error/warning checking did not correctly parse output from flake8. This
resulted in Syntastic incorrectly displaying some warnings as errors.
2013-01-22 15:19:28 -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
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
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
Artem Nezvigin
4126760bca Add python checker that uses python itself
The advantage to this is that no 3rd party modules are required. People
new to Python probably won't have flake8/pyflakes/pylint installed. This
will get them basic syntax checking (no linting) out of the box.
2012-12-01 12:17:46 -08:00
Jose Jiménez
9504f526d4 The warnings were shown as errors when using flake8 2012-10-26 13:27:03 +02: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