Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typo RUBUCOP --> RUBOCOP for slim lint #942

Merged
merged 1 commit into from
Sep 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ale_linters/slim/slimlint.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ function! ale_linters#slim#slimlint#GetCommand(buffer) abort

let l:rubocop_config = ale#path#FindNearestFile(a:buffer, '.rubocop.yml')

" Set SLIM_LINT_RUBUCOP_CONF variable as it is needed for slim-lint to
" Set SLIM_LINT_RUBOCOP_CONF variable as it is needed for slim-lint to
" pick up the rubocop config.
"
" See https://github.com/sds/slim-lint/blob/master/lib/slim_lint/linter/README.md#rubocop
if !empty(l:rubocop_config)
if ale#Has('win32')
let l:command = 'set SLIM_LINT_RUBUCOP_CONF=' . ale#Escape(l:rubocop_config) . ' && ' . l:command
let l:command = 'set SLIM_LINT_RUBOCOP_CONF=' . ale#Escape(l:rubocop_config) . ' && ' . l:command
else
let l:command = 'SLIM_LINT_RUBUCOP_CONF=' . ale#Escape(l:rubocop_config) . ' ' . l:command
let l:command = 'SLIM_LINT_RUBOCOP_CONF=' . ale#Escape(l:rubocop_config) . ' ' . l:command
endif
endif

Expand Down
4 changes: 2 additions & 2 deletions test/command_callback/test_slimlint_command_callback.vader
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Execute(The command should have the .rubocop.yml prepended as an env var if one
call ale#test#SetFilename('../slimlint-test-files/subdir/file.slim')

AssertEqual
\ 'SLIM_LINT_RUBUCOP_CONF=''/testplugin/test/slimlint-test-files/.rubocop.yml'' ' . g:default_command,
\ 'SLIM_LINT_RUBOCOP_CONF=''/testplugin/test/slimlint-test-files/.rubocop.yml'' ' . g:default_command,
\ ale_linters#slim#slimlint#GetCommand(bufnr(''))

Execute(The command should have the .rubocop.yml prepended as an env var if one exists on win32):
Expand All @@ -31,5 +31,5 @@ Execute(The command should have the .rubocop.yml prepended as an env var if one
let g:ale_has_override['win32'] = 1

AssertEqual
\ 'set SLIM_LINT_RUBUCOP_CONF=''/testplugin/test/slimlint-test-files/.rubocop.yml'' && ' . g:default_command,
\ 'set SLIM_LINT_RUBOCOP_CONF=''/testplugin/test/slimlint-test-files/.rubocop.yml'' && ' . g:default_command,
\ ale_linters#slim#slimlint#GetCommand(bufnr(''))