From 6014bdc57f161f5ae5140e4247b144ae149bf894 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Tue, 26 Jul 2016 21:34:04 +0300 Subject: [PATCH] Remove checker tsc. Checker "tsc" has been removed, in favour of the external checker "tsuquyomi" (https://github.com/Quramy/tsuquyomi). Reference: #1811 --- README.markdown | 58 +++++++++++++++----------- doc/syntastic-checkers.txt | 27 +----------- plugin/syntastic.vim | 2 +- plugin/syntastic/registry.vim | 2 +- syntax_checkers/typescript/tsc.vim | 66 ------------------------------ 5 files changed, 38 insertions(+), 117 deletions(-) delete mode 100644 syntax_checkers/typescript/tsc.vim diff --git a/README.markdown b/README.markdown index 7e493df2..a1510707 100644 --- a/README.markdown +++ b/README.markdown @@ -30,16 +30,17 @@ 4.4. [Are there any local checkers for HTML5 that I can use with syntastic?](#faqhtml5) 4.5. [The `perl` checker has stopped working...](#faqperl) 4.6. [What happened to the `rustc` checker?](#faqrust) -4.7. [What happened to the `xcrun` checker?](#faqxcrun) -4.8. [I run a checker and the location list is not updated...](#faqloclist) -4.8. [I run`:lopen` or `:lwindow` and the error window is empty...](#faqloclist) -4.9. [How can I pass additional arguments to a checker?](#faqargs) -4.10. [Syntastic supports several checkers for my filetype - how do I tell which one(s) to use?](#faqcheckers) -4.11. [What is the difference between syntax checkers and style checkers?](#faqstyle) -4.12. [I have enabled multiple checkers for the current filetype. How can I display all errors from all checkers together?](#faqaggregate) -4.13. [How can I jump between the different errors without using the location list at the bottom of the window?](#faqlnext) -4.14. [My favourite checker needs to load a configuration file from the project's root rather than the current directory...](#faqconfig) -4.15. [The error window is closed automatically when I :quit the current buffer but not when I :bdelete it?](#faqbdelete) +4.7. [What happened to the `tsc` checker?](#faqtsc) +4.8. [What happened to the `xcrun` checker?](#faqxcrun) +4.9. [I run a checker and the location list is not updated...](#faqloclist) +4.9. [I run`:lopen` or `:lwindow` and the error window is empty...](#faqloclist) +4.10. [How can I pass additional arguments to a checker?](#faqargs) +4.11. [Syntastic supports several checkers for my filetype - how do I tell which one(s) to use?](#faqcheckers) +4.12. [What is the difference between syntax checkers and style checkers?](#faqstyle) +4.13. [I have enabled multiple checkers for the current filetype. How can I display all errors from all checkers together?](#faqaggregate) +4.14. [How can I jump between the different errors without using the location list at the bottom of the window?](#faqlnext) +4.15. [My favourite checker needs to load a configuration file from the project's root rather than the current directory...](#faqconfig) +4.16. [The error window is closed automatically when I :quit the current buffer but not when I :bdelete it?](#faqbdelete) 5. [Resources](#otherresources) - - - @@ -70,10 +71,10 @@ YACC, YAML, YANG data models, z80, Zope page templates, and Zsh. See the [manual][checkers] for details about the corresponding supported checkers (`:help syntastic-checkers` in Vim). -A number of third-party Vim plugins also provide checkers for syntastic, -for example: [merlin][merlin], [omnisharp-vim][omnisharp], [rust.vim][rust], -[syntastic-extras][myint], [syntastic-more][roktas], [vim-crystal][crystal], -[vim-eastwood][eastwood], and [vim-swift][swift]. +A number of third-party Vim plugins also provide checkers for syntastic, for +example: [merlin][merlin], [omnisharp-vim][omnisharp], [rust.vim][rust], +[syntastic-extras][myint], [syntastic-more][roktas], [tsuquyomi][tsuquyomi], +[vim-crystal][crystal], [vim-eastwood][eastwood], and [vim-swift][swift]. 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 @@ -303,9 +304,17 @@ __4.6. Q. What happened to the `rustc` checker?__ A. It is now part of the [rust.vim][rust] plugin. If you install this plugin the checker should be picked up automatically by syntastic. + + +__4.7. Q. What happened to the `tsc` checker?__ + +A. It didn't meet people's expectations and it has been removed. Please +consider using the external checker [tsuquyomi][tsuquyomi] instead. If you +install this plugin the checker should be picked up automatically by syntastic. + -__4.7. Q. What happened to the `xcrun` checker?__ +__4.8. 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][swift] plugin. If you @@ -313,8 +322,8 @@ install this plugin the checker should be picked up automatically by syntastic. -__4.8. Q. I run a checker and the location list is not updated...__ -__4.8. Q. I run`:lopen` or `:lwindow` and the error window is empty...__ +__4.9. Q. I run a checker and the location list is not updated...__ +__4.9. 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 @@ -326,7 +335,7 @@ let g:syntastic_always_populate_loc_list = 1 -__4.9. Q. How can I pass additional arguments to a checker?__ +__4.10. 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 @@ -342,7 +351,7 @@ See `:help syntastic-checker-options` for more information. -__4.10. Q. Syntastic supports several checkers for my filetype - how do I tell it +__4.11. 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`: @@ -383,7 +392,7 @@ filetype of the current file is `php`). -__4.11. Q. What is the difference between syntax checkers and style checkers?__ +__4.12. 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 @@ -413,7 +422,7 @@ See `:help syntastic_quiet_messages` for details. -__4.12. Q. I have enabled multiple checkers for the current filetype. How can I +__4.13. Q. I have enabled multiple checkers for the current filetype. How can I display all errors from all checkers together?__ A. Set `g:syntastic_aggregate_errors` to 1 in your `vimrc`: @@ -425,7 +434,7 @@ See `:help syntastic-aggregating-errors` for more details. -__4.13. Q. How can I jump between the different errors without using the location +__4.14. 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 @@ -437,7 +446,7 @@ mappings (among other things). -__4.14. My favourite checker needs to load a configuration file from the +__4.15. My favourite checker needs to load a configuration file from the project's root rather than the current directory...__ A. You can set up an `autocmd` to search for the configuration file in the @@ -456,7 +465,7 @@ autocmd FileType javascript let b:syntastic_javascript_jscs_args = ``` -__4.15. Q. The error window is closed automatically when I :quit the current buffer +__4.16. 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 @@ -510,6 +519,7 @@ a look at [ghcmod-vim][ghcmod], [jedi-vim][jedi], [python-mode][python_mode], [v [swift]: https://github.com/kballard/vim-swift [tidy]: http://www.htacg.org/tidy-html5/ [tidy_old]: http://tidy.sourceforge.net/ +[tsuquyomi]: https://github.com/Quramy/tsuquyomi/ [unimpaired]: https://github.com/tpope/vim-unimpaired [vam]: https://github.com/MarcWeber/vim-addon-manager [vim]: http://www.vim.org/ diff --git a/doc/syntastic-checkers.txt b/doc/syntastic-checkers.txt index d1b915f1..cff6d9fb 100644 --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@ -6087,8 +6087,7 @@ SYNTAX CHECKERS FOR TYPESCRIPT *syntastic-checkers-typescript* The following checkers are available for TypeScript (filetype "typescript"): 1. ESLint...................|syntastic-typescript-eslint| - 2. tsc......................|syntastic-typescript-tsc| - 3. TSLint...................|syntastic-typescript-tslint| + 2. TSLint...................|syntastic-typescript-tslint| ------------------------------------------------------------------------------ 1. ESLint *syntastic-typescript-eslint* @@ -6118,29 +6117,7 @@ as "typescript-vim": See also: |syntastic-html-eslint|, |syntastic-javascript-eslint|. ------------------------------------------------------------------------------ -2. tsc *syntastic-typescript-tsc* - -Name: tsc -Maintainer: Bill Casarin - -"tsc" is a compiler for TypeScript. See the project's page for details: - - http://www.typescriptlang.org/ - -Checker options~ - -This checker is initialised using the "makeprgBuild()" function and thus it -accepts the standard options described at |syntastic-config-makeprg|. - -Note~ - -You probably also need a plugin to set |filetype| for TypeScript files, such -as "typescript-vim": - - https://github.com/leafgarland/typescript-vim - ------------------------------------------------------------------------------- -3. TSLint *syntastic-typescript-tslint* +2. TSLint *syntastic-typescript-tslint* Name: tslint Maintainer: Seon-Wook Park diff --git a/plugin/syntastic.vim b/plugin/syntastic.vim index a644eed5..6cdf9224 100644 --- a/plugin/syntastic.vim +++ b/plugin/syntastic.vim @@ -19,7 +19,7 @@ if has('reltime') lockvar! g:_SYNTASTIC_START endif -let g:_SYNTASTIC_VERSION = '3.7.0-167' +let g:_SYNTASTIC_VERSION = '3.7.0-168' lockvar g:_SYNTASTIC_VERSION " Sanity checks {{{1 diff --git a/plugin/syntastic/registry.vim b/plugin/syntastic/registry.vim index 0c2d261f..392d65b7 100644 --- a/plugin/syntastic/registry.vim +++ b/plugin/syntastic/registry.vim @@ -93,7 +93,7 @@ let s:_DEFAULT_CHECKERS = { \ 'trig': ['rapper'], \ 'turtle': ['rapper'], \ 'twig': ['twiglint'], - \ 'typescript': ['tsc'], + \ 'typescript': [], \ 'vala': ['valac'], \ 'verilog': ['verilator'], \ 'vhdl': ['ghdl'], diff --git a/syntax_checkers/typescript/tsc.vim b/syntax_checkers/typescript/tsc.vim deleted file mode 100644 index de9242e5..00000000 --- a/syntax_checkers/typescript/tsc.vim +++ /dev/null @@ -1,66 +0,0 @@ -"============================================================================ -"File: tsc.vim -"Description: TypeScript syntax checker -"Maintainer: Bill Casarin -" -"============================================================================ - -if exists('g:loaded_syntastic_typescript_tsc_checker') - finish -endif -let g:loaded_syntastic_typescript_tsc_checker = 1 - -if !exists('g:syntastic_typescript_tsc_sort') - let g:syntastic_typescript_tsc_sort = 1 -endif - -let s:save_cpo = &cpo -set cpo&vim - -function! SyntaxCheckers_typescript_tsc_IsAvailable() dict - if !executable(self.getExec()) - return 0 - endif - - let version_output = split(syntastic#util#system(self.getExecEscaped() . ' --version'), '\n', 1) - let ver = filter(copy(version_output), 'v:val =~# ''\m\= 0 -endfunction - -function! SyntaxCheckers_typescript_tsc_GetLocList() dict - let makeprg = self.makeprgBuild({ - \ 'args': '--module commonjs', - \ 'args_after': (s:tsc_new ? '--noEmit' : '--out ' . syntastic#util#DevNull()) }) - - let errorformat = - \ '%E%f %#(%l\,%c): error %m,' . - \ '%E%f %#(%l\,%c): %m,' . - \ '%Eerror %m,' . - \ '%C%\s%\+%m' - - return SyntasticMake({ - \ 'makeprg': makeprg, - \ 'errorformat': errorformat, - \ 'postprocess': ['guards'], - \ 'defaults': {'bufnr': bufnr('')} }) -endfunction - -call g:SyntasticRegistry.CreateAndRegisterChecker({ - \ 'filetype': 'typescript', - \ 'name': 'tsc'}) - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim: set sw=4 sts=4 et fdm=marker: