2 Commits

Author SHA1 Message Date
Horacio Sanson 7940a46d5a fix(tests): fix ale_c_build_dir_names being unset in tests (#5109)
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
- Use ale#Set() to set the ale_c_build_dir_names variable.
- Ensure SetUpLinterTest() is called before any Save commands in tests.
- Add c.vim to runtime before non-linter tests are executed.
- Remove workarounds in c.vim.
2026-03-29 11:03:19 +09:00
Copilot 90d8f8d2d2 Fix FindCompileCommands to handle absolute paths in c_build_dir_names (#5096)
CI / build_image (push) Has been cancelled
CI / test_ale (--linters-only) (push) Has been cancelled
CI / test_ale (--lua-only) (push) Has been cancelled
CI / test_ale (--neovim-07-only) (push) Has been cancelled
CI / test_ale (--neovim-08-only) (push) Has been cancelled
CI / test_ale (--vim-80-only) (push) Has been cancelled
CI / test_ale (--vim-90-only) (push) Has been cancelled
* Initial plan

* Fix FindCompileCommands to handle absolute paths in c_build_dir_names

Use ale#path#GetAbsPath to resolve build directory paths, which correctly
handles both absolute and relative paths. When the dirname is absolute,
derive the project root from the parent of the build directory.

Co-authored-by: w0rp <3518142+w0rp@users.noreply.github.com>

* Improve comment clarity in FindCompileCommands

Co-authored-by: w0rp <3518142+w0rp@users.noreply.github.com>

* Add defensive ale#Set for c_build_dir_names in FindCompileCommands

Mirror the existing s:CanParseMakefile pattern to ensure the
g:ale_c_build_dir_names variable always exists when ale#Var is
called, even if test Save/Restore cycles delete it.

Co-authored-by: w0rp <3518142+w0rp@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: w0rp <3518142+w0rp@users.noreply.github.com>
2026-03-28 21:52:26 +09:00