Skip to content

Commit

Permalink
Make cmake-lint read .cmake-format config file (dense-analysis#4747)
Browse files Browse the repository at this point in the history
  • Loading branch information
yous authored Apr 7, 2024
1 parent 6c10a51 commit b6b9612
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ale_linters/cmake/cmake_lint.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function! ale_linters#cmake#cmake_lint#Command(buffer) abort
let l:executable = ale_linters#cmake#cmake_lint#Executable(a:buffer)
let l:options = ale#Var(a:buffer, 'cmake_cmake_lint_options')

return ale#Escape(l:executable) . ' ' . l:options . ' %t'
return ale#Escape(l:executable) . ' ' . l:options . ' %s'
endfunction

function! ale_linters#cmake#cmake_lint#Handle(buffer, lines) abort
Expand Down
4 changes: 2 additions & 2 deletions test/linter/test_cmake_cmake_lint.vader
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ After:
call ale#assert#TearDownLinterTest()

Execute(The default command should be correct):
AssertLinter 'cmake-lint', ale#Escape('cmake-lint') . ' %t'
AssertLinter 'cmake-lint', ale#Escape('cmake-lint') . ' %s'

Execute(The executable should be configurable):
let g:ale_cmake_cmake_lint_executable = 'foobar'

AssertLinter 'foobar', ale#Escape('foobar') . ' %t'
AssertLinter 'foobar', ale#Escape('foobar') . ' %s'

0 comments on commit b6b9612

Please sign in to comment.