From 21e38bc3bfc0de579c2a146cf6d4559a25dfdc94 Mon Sep 17 00:00:00 2001 From: Justin Donaldson Date: Sun, 7 Jul 2013 13:36:35 -0700 Subject: [PATCH 1/5] add hss syntax checker --- syntax_checkers/hss/hss.vim | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 syntax_checkers/hss/hss.vim diff --git a/syntax_checkers/hss/hss.vim b/syntax_checkers/hss/hss.vim new file mode 100644 index 00000000..3bf9a6f0 --- /dev/null +++ b/syntax_checkers/hss/hss.vim @@ -0,0 +1,41 @@ + +"============================================================================ +"File: hss.vim +"Description: Syntax checking plugin for syntastic.vim +"Maintainer: Justin Donaldson (jdonaldson@gmail.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_hss_hss_checker") + finish +endif +let g:loaded_syntastic_hss_hss_checker=1 + +function! SyntaxCheckers_hss_hss_IsAvailable() + return executable('hss') +endfunction + +function! SyntaxCheckers_hss_hss_GetLocList() + let makeprg = syntastic#makeprg#build({ + \ 'exe': 'hss', + \ 'fname': syntastic#util#shescape(expand('%')), + \ 'filetype': 'hss', + \ 'subchecker': 'hss' }) + + let errorformat = '%E%f:%l: %m' + + return SyntasticMake({ + \ 'makeprg': makeprg, + \ 'errorformat': errorformat, + \ 'cwd': fnamemodify(expand('%'), ':h') }) + +endfunction + +call g:SyntasticRegistry.CreateAndRegisterChecker({ + \ 'filetype': 'hss', + \ 'name': 'hss'}) From 5ea175b6c5f527ef81d5ee72a87a94f526c8ccd3 Mon Sep 17 00:00:00 2001 From: Justin Donaldson Date: Sun, 7 Jul 2013 14:29:59 -0700 Subject: [PATCH 2/5] ignore output by default --- syntax_checkers/hss/hss.vim | 1 + 1 file changed, 1 insertion(+) diff --git a/syntax_checkers/hss/hss.vim b/syntax_checkers/hss/hss.vim index 3bf9a6f0..5e39477a 100644 --- a/syntax_checkers/hss/hss.vim +++ b/syntax_checkers/hss/hss.vim @@ -23,6 +23,7 @@ endfunction function! SyntaxCheckers_hss_hss_GetLocList() let makeprg = syntastic#makeprg#build({ \ 'exe': 'hss', + \ 'args' : '-output /dev/null', \ 'fname': syntastic#util#shescape(expand('%')), \ 'filetype': 'hss', \ 'subchecker': 'hss' }) From 491f5a9e9b9edbef3e281397a1e7fd3ac5b6e3a9 Mon Sep 17 00:00:00 2001 From: Justin Donaldson Date: Sun, 7 Jul 2013 14:36:22 -0700 Subject: [PATCH 3/5] redirect output to dev null for syntax checking --- syntax_checkers/hss/hss.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/syntax_checkers/hss/hss.vim b/syntax_checkers/hss/hss.vim index 5e39477a..badb2573 100644 --- a/syntax_checkers/hss/hss.vim +++ b/syntax_checkers/hss/hss.vim @@ -20,10 +20,16 @@ function! SyntaxCheckers_hss_hss_IsAvailable() return executable('hss') endfunction +if has('win32') + let s:dev_null = 'NUL' +else + let s:dev_null = '/dev/null' +endif + function! SyntaxCheckers_hss_hss_GetLocList() let makeprg = syntastic#makeprg#build({ \ 'exe': 'hss', - \ 'args' : '-output /dev/null', + \ 'args' : '-output ' . s:dev_null, \ 'fname': syntastic#util#shescape(expand('%')), \ 'filetype': 'hss', \ 'subchecker': 'hss' }) From 69951dfe6ecd08a12298604a41107572d682ef67 Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Mon, 8 Jul 2013 11:17:00 +0300 Subject: [PATCH 4/5] Cleanup. --- syntax_checkers/hss/hss.vim | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/syntax_checkers/hss/hss.vim b/syntax_checkers/hss/hss.vim index badb2573..5d2cf005 100644 --- a/syntax_checkers/hss/hss.vim +++ b/syntax_checkers/hss/hss.vim @@ -1,8 +1,7 @@ - "============================================================================ "File: hss.vim "Description: Syntax checking plugin for syntastic.vim -"Maintainer: Justin Donaldson (jdonaldson@gmail.com) +"Maintainer: Justin Donaldson (jdonaldson@gmail.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 @@ -20,27 +19,18 @@ function! SyntaxCheckers_hss_hss_IsAvailable() return executable('hss') endfunction -if has('win32') - let s:dev_null = 'NUL' -else - let s:dev_null = '/dev/null' -endif - function! SyntaxCheckers_hss_hss_GetLocList() let makeprg = syntastic#makeprg#build({ - \ 'exe': 'hss', - \ 'args' : '-output ' . s:dev_null, - \ 'fname': syntastic#util#shescape(expand('%')), - \ 'filetype': 'hss', - \ 'subchecker': 'hss' }) + \ 'exe': 'hss', + \ 'args' : '-output ' . syntastic#util#DevNull(), + \ 'filetype': 'hss', + \ 'subchecker': 'hss' }) let errorformat = '%E%f:%l: %m' return SyntasticMake({ - \ 'makeprg': makeprg, - \ 'errorformat': errorformat, - \ 'cwd': fnamemodify(expand('%'), ':h') }) - + \ 'makeprg': makeprg, + \ 'errorformat': errorformat }) endfunction call g:SyntasticRegistry.CreateAndRegisterChecker({ From 0725802a330da028a89279802e66e19f09d4216a Mon Sep 17 00:00:00 2001 From: LCD 47 Date: Mon, 8 Jul 2013 11:23:47 +0300 Subject: [PATCH 5/5] Added hss to the list of supported languages. --- README.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.markdown b/README.markdown index 4663db1a..ded4c764 100644 --- a/README.markdown +++ b/README.markdown @@ -27,12 +27,12 @@ execute their script to find them. At the time of this writing, syntax checking plugins exist for Ada, AppleScript, Bourne shell, C, C++, C#, CoffeeScript, Coco, Coq, CSS, -Cucumber, CUDA, D, Dart, DocBook, Elixir, Erlang, eRuby, Fortran, Gentoo -metadata, Go, Haml, Haskell, Haxe, HTML, Java, JavaScript, JSON, LESS, -LISP, LLVM intermediate language, Lua, MATLAB, NASM, Objective-C, -Objective-C++, OCaml, Perl, Perl POD, PHP, Puppet, Python, -reStructuredText, Ruby, Rust, SASS/SCSS, Scala, Slim, Tcl, TeX, Twig, -TypeScript, Vala, VHDL, xHtml, XML, XSLT, YAML, z80, Zope page +Cucumber, CUDA, D, Dart, DocBook, Elixir, Erlang, eRuby, Fortran, +Gentoo metadata, Go, Haml, Haskell, Haxe, hss, HTML, Java, JavaScript, +JSON, LESS, LISP, LLVM intermediate language, Lua, MATLAB, NASM, +Objective-C, Objective-C++, OCaml, Perl, Perl POD, PHP, Puppet, Python, +reStructuredText, Ruby, Rust, SASS/SCSS, Scala, Slim, Tcl, TeX, +Twig, TypeScript, Vala, VHDL, xHtml, XML, XSLT, YAML, z80, Zope page templates, zsh. ## Screenshot