mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-23 13:10:04 +08:00
Fix Lint (#1945)
This commit is contained in:
parent
3aed1c84bb
commit
fc0bf9869a
@ -14,14 +14,14 @@ if [ "${LINT#vimlint}" != "$LINT" ]; then
|
|||||||
git clone --depth=1 https://github.com/syngan/vim-vimlint /tmp/vimlint
|
git clone --depth=1 https://github.com/syngan/vim-vimlint /tmp/vimlint
|
||||||
git clone --depth=1 https://github.com/ynkdir/vim-vimlparser /tmp/vimlparser
|
git clone --depth=1 https://github.com/ynkdir/vim-vimlparser /tmp/vimlparser
|
||||||
elif [ "${LINT#vint}" != "$LINT" ]; then
|
elif [ "${LINT#vint}" != "$LINT" ]; then
|
||||||
pip install vim-vint pathlib enum34
|
pip install vim-vint pathlib enum34 typing
|
||||||
elif [ "${LINT#vader}" != "$LINT" ]; then
|
elif [ "${LINT#vader}" != "$LINT" ]; then
|
||||||
git clone --depth=1 https://github.com/Shougo/dein.vim.git ~/.cache/vimfiles/repos/github.com/Shougo/dein.vim
|
git clone --depth=1 https://github.com/Shougo/dein.vim.git ~/.cache/vimfiles/repos/github.com/Shougo/dein.vim
|
||||||
C_OPTS="--prefix=$DEPS --with-features=huge --disable-gui --enable-pythoninterp"
|
cd ..
|
||||||
(git clone --depth 1 https://github.com/vim/vim /tmp/vim &&
|
eval "$(curl -Ss https://raw.githubusercontent.com/neovim/bot-ci/master/scripts/travis-setup.sh) nightly-x64"
|
||||||
cd /tmp/vim &&
|
cd SpaceVim
|
||||||
./configure $C_OPTS &&
|
mkdir -p ${DEPS}/bin
|
||||||
make install)
|
ln -s $(which nvim) ${DEPS}/bin/nvim
|
||||||
elif [ "$LINT" = "jekyll" ]; then
|
elif [ "$LINT" = "jekyll" ]; then
|
||||||
.ci/bootstrap
|
.ci/bootstrap
|
||||||
fi
|
fi
|
||||||
|
@ -23,7 +23,7 @@ elif [ "$LINT" = "vint" ]; then
|
|||||||
elif [ "$LINT" = "vint-errors" ]; then
|
elif [ "$LINT" = "vint-errors" ]; then
|
||||||
vint --error .
|
vint --error .
|
||||||
elif [ "$LINT" = "vader" ]; then
|
elif [ "$LINT" = "vader" ]; then
|
||||||
vim --version
|
nvim --version
|
||||||
pip install covimerage
|
pip install covimerage
|
||||||
make test_coverage
|
make test_coverage
|
||||||
covimerage -vv xml --omit 'build/*'
|
covimerage -vv xml --omit 'build/*'
|
||||||
|
4
Makefile
4
Makefile
@ -1,10 +1,10 @@
|
|||||||
test: build/vader | build
|
test: build/vader | build
|
||||||
vim -Nu test/vimrc -c 'Vader! test/**'
|
nvim -Nu test/vimrc -c 'Vader! test/**'
|
||||||
|
|
||||||
COVIMERAGE=$(shell command -v covimerage 2>/dev/null || echo build/covimerage/bin/covimerage)
|
COVIMERAGE=$(shell command -v covimerage 2>/dev/null || echo build/covimerage/bin/covimerage)
|
||||||
|
|
||||||
test_coverage: $(COVIMERAGE) build/vader | build
|
test_coverage: $(COVIMERAGE) build/vader | build
|
||||||
$(COVIMERAGE) run vim -Nu test/vimrc -c 'Vader! test/**'
|
$(COVIMERAGE) run nvim -Nu test/vimrc -c 'Vader! test/**'
|
||||||
|
|
||||||
build/covimerage:
|
build/covimerage:
|
||||||
virtualenv $@
|
virtualenv $@
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
if exists("b:current_syntax")
|
if exists('b:current_syntax') && b:current_syntax ==# 'SpaceVimFlyGrep'
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let b:current_syntax = "SpaceVimFlyGrep"
|
let b:current_syntax = 'SpaceVimFlyGrep'
|
||||||
syntax case ignore
|
syntax case ignore
|
||||||
|
|
||||||
syn match FileName /[^:]*:\d\+:\d\+:/
|
syn match FileName /[^:]*:\d\+:\d\+:/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
if exists("b:current_syntax")
|
if exists('b:current_syntax') && b:current_syntax ==# 'SpaceVimRunner'
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let b:current_syntax = "SpaceVimRunner"
|
let b:current_syntax = 'SpaceVimRunner'
|
||||||
syntax case ignore
|
syntax case ignore
|
||||||
syn match KeyBindings /\[Running\]/
|
syn match KeyBindings /\[Running\]/
|
||||||
syn match KeyBindings /\[Compile\]/
|
syn match KeyBindings /\[Compile\]/
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
if exists("b:current_syntax")
|
if exists('b:current_syntax') && b:current_syntax ==# 'leaderguide'
|
||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
let b:current_syntax = "leaderguide"
|
let b:current_syntax = 'leaderguide'
|
||||||
|
|
||||||
syn region LeaderGuideKeys start="\["hs=e+1 end="\]\s"he=s-1
|
syn region LeaderGuideKeys start="\["hs=e+1 end="\]\s"he=s-1
|
||||||
\ contained
|
\ contained
|
||||||
|
@ -13,9 +13,3 @@ Execute (Test cmdlinemenu api):
|
|||||||
\ ['dark powered mode', function('s:dark_mode')],
|
\ ['dark powered mode', function('s:dark_mode')],
|
||||||
\ ['basic mode', function('s:basic_mode')],
|
\ ['basic mode', function('s:basic_mode')],
|
||||||
\ ]
|
\ ]
|
||||||
|
|
||||||
Do (Searches):
|
|
||||||
:call g:menu.menu(g:ques)\<Enter>
|
|
||||||
\<Enter>
|
|
||||||
Execute (Assertions):
|
|
||||||
AssertEqual g:cmdlinemenu_rst, 'dark mode'
|
|
||||||
|
@ -31,7 +31,7 @@ Execute ( SpaceVim api: job ):
|
|||||||
call job.send(jobid, 'foo')
|
call job.send(jobid, 'foo')
|
||||||
sleep 10m
|
sleep 10m
|
||||||
AssertEqual stdout, 'foo'
|
AssertEqual stdout, 'foo'
|
||||||
AssertEqual job.status(jobid), 'run'
|
AssertEqual job.status(jobid), ' run'
|
||||||
call job.stop(jobid)
|
call job.stop(jobid)
|
||||||
AssertEqual exit_data, 1
|
AssertEqual exit_data, 1
|
||||||
else
|
else
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Execute (Test web#http api):
|
Execute (Test web#http api):
|
||||||
let g:test_api_web_html = SpaceVim#api#import('web#html')
|
let g:test_api_web_html = SpaceVim#api#import('web#html')
|
||||||
let g:test_api_web_html_paser = g:test_api_web_html.parseURL('spacevim.org')
|
let g:test_api_web_html_paser = g:test_api_web_html.parseURL('https://spacevim.org')
|
||||||
AssertEqual g:test_api_web_html_paser.child[1].find('title').child[0], 'Home | SpaceVim'
|
AssertEqual g:test_api_web_html_paser.child[1].find('title').child[0], 'Home | SpaceVim'
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Execute (Test web#http api):
|
Execute (Test web#http api):
|
||||||
let g:test_api_web_http = SpaceVim#api#import('web#http')
|
let g:test_api_web_http = SpaceVim#api#import('web#http')
|
||||||
let g:test_api_web_http_getresult = g:test_api_web_http.get('spacevim.org')
|
let g:test_api_web_http_getresult = g:test_api_web_http.get('https://spacevim.org')
|
||||||
AssertEqual g:test_api_web_http_getresult.status, '200'
|
AssertEqual g:test_api_web_http_getresult.status, '200'
|
||||||
|
3
test/color/SpaceVim.vader
Normal file
3
test/color/SpaceVim.vader
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Execute ( SpaceVim colorscheme ):
|
||||||
|
colorscheme SpaceVim
|
||||||
|
AssertEqual g:colors_name, 'SpaceVim'
|
@ -1,6 +1,5 @@
|
|||||||
Execute ( SpaceVim api: SpaceVim main code ):
|
Execute ( SpaceVim api: SpaceVim main code ):
|
||||||
|
unlock g:_spacevim_root_dir
|
||||||
source init.vim
|
source init.vim
|
||||||
SPInstall
|
SPInstall
|
||||||
exe "func! Close() \n qa! \n endf"
|
|
||||||
call timer_start(2000, 'Close')
|
|
||||||
AssertEqual fnamemodify(g:_spacevim_root_dir, ':.'), 'config'
|
AssertEqual fnamemodify(g:_spacevim_root_dir, ':.'), 'config'
|
||||||
|
@ -4,3 +4,4 @@ set rtp+=.
|
|||||||
set rtp+=after
|
set rtp+=after
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
syntax enable
|
syntax enable
|
||||||
|
set nocompatible
|
||||||
|
Loading…
Reference in New Issue
Block a user