validator.vim
validator.vim copied to clipboard
Add support for coffeelint
I tried creating a lint file without using stdin = True
, but it didn't seem to work without it. Not sure why.
It seems to work when I removed stdin = True
:
class CoffeeLint(Validator):
__filetype__ = "coffee"
- stdin = True
checker = "coffeelint"
- args = " --stdin --reporter csv"
+ args = "--reporter csv"
regex = r"""
.+?,
(?P<lnum>\d+),
Hmm, it does not seem to work on my setup. Here's the debug log without stdin = True
:
2017-02-12 20:01:16,975 [WARNING] parse input = [<lints.coffee.coffeelint.CoffeeLint object at 0x10fec4c90>, [u'path,lineNumber,lineNumberEnd,level,message'], 1L]
2017-02-12 20:01:16,976 [WARNING] parsed lists = []
Likewise, with the current commit:
2017-02-12 20:02:48,694 [WARNING] parse input = [<lints.coffee.coffeelint.CoffeeLint object at 0x111ec7cd0>, [u'path,lineNumber,lineNumberEnd,level,message', u'stdin,6,,error,Curly bracesmust have the proper spacing There should be 0 spaces inside "{".'], 1L]
2017-02-12 20:02:48,694 [WARNING] parsed lists = [{'lnum': u'6', 'text': '[coffeelint]Curly braces must have the proper spacing There should be 0 spaces inside "{".', 'enum': 2, 'bufnr': 1L, 'warning': None, 'error': u'error', 'type': 'E', 'col': u''}]
Here is my vim --version
output:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Feb 3 2017 21:12:47)
MacOS X (unix) version
Included patches: 1-297
Compiled by Homebrew
Huge version with MacVim GUI. Features included (+) or not (-):
+acl +find_in_path -mouse_sysmouse -tag_any_white
+arabic +float +mouse_urxvt +tcl
+autocmd +folding +mouse_xterm +termguicolors
+balloon_eval -footer +multi_byte +terminfo
+browse +fork() +multi_lang +termresponse
++builtin_terms +fullscreen -mzscheme +textobjects
+byte_offset -gettext +netbeans_intg +timers
+channel -hangul_input +num64 +title
+cindent +iconv +odbeditor +toolbar
+clientserver +insert_expand +packages +transparency
+clipboard +job +path_extra +user_commands
+cmdline_compl +jumplist +perl +vertsplit
+cmdline_hist +keymap +persistent_undo +virtualedit
+cmdline_info +lambda +postscript +visual
+comments +langmap +printer +visualextra
+conceal +libcall +profile +viminfo
+cryptv +linebreak +python +vreplace
+cscope +lispindent -python3 +wildignore
+cursorbind +listcmds +quickfix +wildmenu
+cursorshape +localmap +reltime +windows
+dialog_con_gui +lua +rightleft +writebackup
+diff +menu +ruby -X11
+digraphs +mksession +scrollbind -xfontset
+dnd +modify_fname +signs +xim
-ebcdic +mouse +smartindent -xpm
+emacs_tags +mouseshape +startuptime -xsmp
+eval +mouse_dec +statusline -xterm_clipboard
+ex_extra -mouse_gpm -sun_workshop -xterm_save
+extra_search -mouse_jsbterm +syntax
+farsi +mouse_netterm +tag_binary
+file_in_path +mouse_sgr +tag_old_static
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: clang -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -F/usr/local/opt/python/Frameworks -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: clang -L. -L/usr/local/lib -L. -L/usr/local/lib -F/usr/local/opt/python/Frameworks -L/usr/local/opt/python/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 -framework CoreFoundation -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon -lm -lncurses -liconv -framework Cocoa -L/usr/local/opt/lua/lib -llua -fstack-protector -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -F/usr/local/opt/python/Frameworks -framework Python -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -framework Ruby
Did you also removed --stdin
from args
?
Yes, I did.