Remove the xcrun checker for Swift.

A better third-party checker is included in Kevin Ballard's plugin
[vim-swift](https://github.com/kballard/vim-swift).
This commit is contained in:
LCD 47 2015-02-20 22:15:09 +02:00
parent d73546dd4a
commit 471ce96afe
4 changed files with 32 additions and 76 deletions

View File

@ -29,14 +29,15 @@
4.3. [Are there any local checkers for HTML5 that I can use with syntastic?](#faqhtml5)
4.4. [The `perl` checker has stopped working...](#faqperl)
4.5. [What happened to the `rustc` checker?](#faqrust)
4.6. [I run a checker and the location list is not updated...](#faqloclist)
4.6. [I run`:lopen` or `:lwindow` and the error window is empty...](#faqloclist)
4.7. [How can I pass additional arguments to a checker?](#faqargs)
4.8. [Syntastic supports several checkers for my filetype - how do I tell which one(s) to use?](#faqcheckers)
4.9. [What is the difference between syntax checkers and style checkers?](#faqstyle)
4.10. [I have enabled multiple checkers for the current filetype. How can I display all of the errors from all of the checkers together?](#faqaggregate)
4.11. [How can I jump between the different errors without using the location list at the bottom of the window?](#faqlnext)
4.12. [The error window is closed automatically when I :quit the current buffer but not when I :bdelete it?](#faqbdelete)
4.6. [What happened to the `xcrun` checker?](#faqxcrun)
4.7. [I run a checker and the location list is not updated...](#faqloclist)
4.7. [I run`:lopen` or `:lwindow` and the error window is empty...](#faqloclist)
4.8. [How can I pass additional arguments to a checker?](#faqargs)
4.9. [Syntastic supports several checkers for my filetype - how do I tell which one(s) to use?](#faqcheckers)
4.10. [What is the difference between syntax checkers and style checkers?](#faqstyle)
4.11. [I have enabled multiple checkers for the current filetype. How can I display all of the errors from all of the checkers together?](#faqaggregate)
4.12. [How can I jump between the different errors without using the location list at the bottom of the window?](#faqlnext)
4.13. [The error window is closed automatically when I :quit the current buffer but not when I :bdelete it?](#faqbdelete)
5. [Resources](#otherresources)
- - -
@ -57,12 +58,12 @@ Chef, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart, DocBook, Dust,
Elixir, Erlang, eRuby, Fortran, Gentoo metadata, GLSL, Go, Haml, Haskell,
Haxe, Handlebars, HSS, HTML, Java, JavaScript, JSON, JSX, LESS, Lex, Limbo,
LISP, LLVM intermediate language, Lua, Markdown, MATLAB, NASM, Objective-C,
Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X and
oBJECTIVE-c++, OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X and
iOS property lists, Puppet, Python, R, Racket, Relax NG, reStructuredText, RPM
spec, Ruby, SASS/SCSS, Scala, Slim, Swift, Tcl, TeX, Texinfo, Twig, TypeScript,
Vala, Verilog, VHDL, VimL, xHtml, XML, XSLT, YACC, YAML, z80, Zope page
templates, and zsh. See the [wiki][3] for details about the corresponding
supported checkers.
spec, Ruby, SASS/SCSS, Scala, Slim, Tcl, TeX, Texinfo, Twig, TypeScript, Vala,
Verilog, VHDL, VimL, xHtml, XML, XSLT, YACC, YAML, z80, Zope page templates,
and zsh. See the [wiki][3] for details about the corresponding supported
checkers.
Below is a screenshot showing the methods that Syntastic uses to display syntax
errors. Note that, in practise, you will only have a subset of these methods
@ -240,10 +241,18 @@ A. It has been included in the [Rust compiler package][12]. If you have
a recent version of the Rust compiler, the checker should be picked up
automatically by syntastic.
<a name="faqxcrun"></a>
__4.6. Q. What happened to the `xcrun` checker?__
A. The `xcrun` checker used to have a security problem and it has been removed.
A better checker for __Swift__ is part of the [vim-swift][24] plugin. If you
install this plugin the checker should be picked up automatically by syntastic.
<a name="faqloclist"></a>
__4.6. Q. I run a checker and the location list is not updated...__
__4.6. Q. I run`:lopen` or `:lwindow` and the error window is empty...__
__4.7. Q. I run a checker and the location list is not updated...__
__4.7. Q. I run`:lopen` or `:lwindow` and the error window is empty...__
A. By default the location list is changed only when you run the `:Errors`
command, in order to minimise conflicts with other plugins. If you want the
@ -255,7 +264,7 @@ let g:syntastic_always_populate_loc_list = 1
<a name="faqargs"></a>
__4.7. Q. How can I pass additional arguments to a checker?__
__4.8. Q. How can I pass additional arguments to a checker?__
A. Almost all syntax checkers use the `makeprgBuild()` function. Those checkers
that do can be configured using global variables. The general form of the
@ -271,7 +280,7 @@ See `:help syntastic-checker-options` for more information.
<a name="faqcheckers"></a>
__4.8. Q. Syntastic supports several checkers for my filetype - how do I tell it
__4.9. Q. Syntastic supports several checkers for my filetype - how do I tell it
which one(s) to use?__
A. Stick a line like this in your `vimrc`:
@ -312,7 +321,7 @@ filetype of the current file is `php`).
<a name="faqstyle"></a>
__4.9. Q. What is the difference between syntax checkers and style checkers?__
__4.10. Q. What is the difference between syntax checkers and style checkers?__
A. The errors and warnings they produce are highlighted differently and can
be filtered by different rules, but otherwise the distinction is pretty much
@ -342,7 +351,7 @@ See `:help syntastic_quiet_messages` for details.
<a name="faqaggregate"></a>
__4.10. Q. I have enabled multiple checkers for the current filetype. How can I
__4.11. Q. I have enabled multiple checkers for the current filetype. How can I
display all of the errors from all of the checkers together?__
A. Set `g:syntastic_aggregate_errors` to 1 in your `vimrc`:
@ -354,7 +363,7 @@ See `:help syntastic-aggregating-errors` for more details.
<a name="faqlnext"></a>
__4.11. Q. How can I jump between the different errors without using the location
__4.12. Q. How can I jump between the different errors without using the location
list at the bottom of the window?__
A. Vim provides several built-in commands for this. See `:help :lnext` and
@ -366,7 +375,7 @@ mappings (among other things).
<a name="faqbdelete"></a>
__4.12. Q. The error window is closed automatically when I :quit the current buffer
__4.13. Q. The error window is closed automatically when I :quit the current buffer
but not when I :bdelete it?__
A. There is no safe way to handle that situation automatically, but you can
@ -416,6 +425,7 @@ a look at [jedi-vim][7], [python-mode][8], or [YouCompleteMe][9].
[21]: https://github.com/validator/validator/releases/latest
[22]: https://github.com/scrooloose/syntastic/wiki/HTML%3A---validator
[23]: http://validator.github.io/validator/#standalone
[24]: https://github.com/kballard/vim-swift
<!--
vim:tw=79:sw=4:

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START
endif
let g:_SYNTASTIC_VERSION = '3.6.0-30'
let g:_SYNTASTIC_VERSION = '3.6.0-31'
lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1

View File

@ -74,7 +74,6 @@ let s:_DEFAULT_CHECKERS = {
\ 'sh': ['sh', 'shellcheck'],
\ 'slim': ['slimrb'],
\ 'spec': ['rpmlint'],
\ 'swift': ['xcrun'],
\ 'tcl': ['nagelfar'],
\ 'tex': ['lacheck', 'chktex'],
\ 'texinfo': ['makeinfo'],

View File

@ -1,53 +0,0 @@
"============================================================================
"File: xcrun.vim
"Description: swift syntax checker - using xcrun
"Maintainer: Tom Fogg <tom@canobe.com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"============================================================================
if exists("g:loaded_syntastic_swift_xcrun_checker")
finish
endif
let g:loaded_syntastic_xcrun_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_swift_xcrun_GetLocList() dict
if !exists('g:syntastic_enable_swift_xcrun_checker') || !g:syntastic_enable_swift_xcrun_checker
call syntastic#log#error('checker swift/xcrun: checks disabled for security reasons; ' .
\ 'set g:syntastic_enable_swift_xcrun_checker to 1 to override')
return []
endif
let makeprg = self.makeprgBuild({ 'args_after': 'swift' })
let errorformat=
\ '%f:%l:%c:{%*[^}]}: %trror: %m,'.
\ '%f:%l:%c:{%*[^}]}: fatal %trror: %m,'.
\ '%f:%l:%c:{%*[^}]}: %tarning: %m,'.
\ '%f:%l:%c: %trror: %m,'.
\ '%f:%l:%c: fatal %trror: %m,'.
\ '%f:%l:%c: %tarning: %m,'.
\ '%f:%l: %trror: %m,'.
\ '%f:%l: fatal %trror: %m,'.
\ '%f:%l: %tarning: %m,' .
\ '%-G%.%#'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'swift',
\ 'name': 'xcrun'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker: