From 85666799bb8d67c44a8a3a514595a44e783f6faf Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Sun, 31 Jul 2016 18:45:34 +0300 Subject: [PATCH] Checker iasl: cleanup. --- README.markdown | 30 +++++++++++------------ doc/syntastic-checkers.txt | 12 ++++----- syntax_checkers/asl/iasl.vim | 47 +++++++++--------------------------- 3 files changed, 32 insertions(+), 57 deletions(-) diff --git a/README.markdown b/README.markdown index a1510707..19e986ef 100644 --- a/README.markdown +++ b/README.markdown @@ -55,21 +55,21 @@ can be done on demand, or automatically as files are saved. If syntax errors are detected, the user is notified and is happy because they didn't have to compile their code or execute their script to find them. -At the time of this writing, syntastic has checking plugins for ActionScript, -Ada, Ansible configurations, API Blueprint, AppleScript, AsciiDoc, Assembly -languages, BEMHTML, Bro, Bourne shell, C, C++, C#, Cabal, Chef, CoffeeScript, -Coco, Coq, CSS, Cucumber, CUDA, D, Dart, DocBook, Dockerfile, 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, Mercury, NASM, Nix, -Objective-C, Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable -Object, OS X and iOS property lists, Pug (formerly Jade), Puppet, Python, -QML, R, Racket, RDF TriG, RDF Turtle, Relax NG, reStructuredText, RPM spec, -Ruby, SASS/SCSS, Scala, Slim, SML, Sphinx, SQL, Stylus, Tcl, TeX, Texinfo, -Twig, TypeScript, Vala, Verilog, VHDL, VimL, xHtml, XML, XSLT, XQuery, -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). +At the time of this writing, syntastic has checking plugins for ACPI +Source Language, ActionScript, Ada, Ansible configurations, API Blueprint, +AppleScript, AsciiDoc, Assembly languages, BEMHTML, Bro, Bourne shell, C, +C++, C#, Cabal, Chef, CoffeeScript, Coco, Coq, CSS, Cucumber, CUDA, D, Dart, +DocBook, Dockerfile, 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, Mercury, NASM, Nix, Objective-C, Objective-C++, OCaml, Perl, Perl +POD, PHP, gettext Portable Object, OS X and iOS property lists, Pug (formerly +Jade), Puppet, Python, QML, R, Racket, RDF TriG, RDF Turtle, Relax NG, +reStructuredText, RPM spec, Ruby, SASS/SCSS, Scala, Slim, SML, Sphinx, SQL, +Stylus, Tcl, TeX, Texinfo, Twig, TypeScript, Vala, Verilog, VHDL, VimL, xHtml, +XML, XSLT, XQuery, 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], diff --git a/doc/syntastic-checkers.txt b/doc/syntastic-checkers.txt index 4fc93e1e..ee0361a7 100644 --- a/doc/syntastic-checkers.txt +++ b/doc/syntastic-checkers.txt @@ -147,18 +147,16 @@ The following checkers are available for the ACPI Source Language (filetype Name: iasl Maintainer: Peter Wu +"iasl" is a compiler/decompiler for ACPI Source Language(ASL) and ACPI Machine +Language (AML). See the project's page for details: + + https://acpica.org/ + Checker options~ This checker is initialised using the "makeprgBuild()" function and thus it accepts the standard options described at |syntastic-config-makeprg|. -Additionally: - - *'g:syntastic_asl_iasl_delete_output'* -Type: boolean -Default: 1 -When set the checker will delete the ".aml" files created by "iasl". - Note~ You probably also need a plugin to set |filetype| for ASL files, such as diff --git a/syntax_checkers/asl/iasl.vim b/syntax_checkers/asl/iasl.vim index 31cc72f6..cb87e052 100644 --- a/syntax_checkers/asl/iasl.vim +++ b/syntax_checkers/asl/iasl.vim @@ -1,6 +1,6 @@ "============================================================================ "File: iasl.vim -"Description: Syntax checking plugin for syntastic.vim using iasl +"Description: Syntax checking plugin for syntastic using iasl "Maintainer: Peter Wu "License: This program is free software. It comes without any warranty, " to the extent permitted by applicable law. You can redistribute @@ -17,30 +17,12 @@ let g:loaded_syntastic_asl_iasl_checker = 1 let s:save_cpo = &cpo set cpo&vim -" Checker options {{{1 +function! SyntaxCheckers_asl_iasl_GetLocList() dict + let tmpdir = syntastic#util#tmpdir() + let makeprg = self.makeprgBuild({ + \ 'args': '-vi', + \ 'args_after': '-p ' . tmpdir }) -if !exists('g:syntastic_asl_iasl_delete_output') - let g:syntastic_asl_iasl_delete_output = 1 -endif - -" }}}1 - -function! SyntaxCheckers_asl_iasl_GetLocList() dict " {{{1 - " Enable less verbose messages for use with IDES (MSVC style). - let iasl_opts = '-vi' - - let output_dir = '' - if g:syntastic_asl_iasl_delete_output - let output_dir = syntastic#util#tmpdir() - let iasl_opts .= ' -p' . syntastic#util#shescape(output_dir) - endif - - let makeprg = self.makeprgBuild({ 'args_after': iasl_opts }) - - " See source/compiler/aslmessages.c for functions that produce output: - " AePrintException, called via AslCommonError, via AslError. - " "%s(%u) : %s" filename, line no, message without ID - " "%s(%u) : %s %4.4d - %s" filename, line no, level, exception code, msg let errorformat = \ '%f(%l) : %trror %n - %m,' . \ '%f(%l) : %tarning %n - %m,' . @@ -48,29 +30,24 @@ function! SyntaxCheckers_asl_iasl_GetLocList() dict " {{{1 \ '%f(%l) : %tptimize %n - %m,' . \ '%f(%l) : %m' - if output_dir !=# '' - silent! call mkdir(output_dir, 'p') - endif - let loclist = SyntasticMake({ \ 'makeprg': makeprg, \ 'errorformat': errorformat, \ 'returns': [0, 255] }) - " Change Remark comments to Warnings. Optimization comments are normally not - " reported unless '-vo' is added to the iasl options. for e in loclist - if e['type'] =~? 'r' || e['type'] =~? 'o' + if e['type'] =~? 'r' let e['type'] = 'W' + elseif e['type'] =~? 'o' + let e['type'] = 'W' + let e['subtype'] = 'Style' endif endfor - if output_dir !=# '' - call syntastic#util#rmrf(output_dir) - endif + call syntastic#util#rmrf(tmpdir) return loclist -endfunction "}}}1 +endfunction call g:SyntasticRegistry.CreateAndRegisterChecker({ \ 'filetype': 'asl',