Skip to content

Add a FindVCSRoot helper function #5040

@rymdbar

Description

@rymdbar

Quite a few tools (see #5039) are searching for .git to determine the project root, often as a fallback method. While git is the prevailing version control system today, it is not the only existing one in use. Thus it would make sense to search also for those other ones.

The Wikipedia article on Version control could be considered to list, in the box down by the end, all notable systems to consider adding support for.

Practically I envision adding a FindVCSRoot() which linters may use instead of FindNearestFileOrDirectory(). Presumably the new function fits well in autoload/ale/path.vim and it would take a buffer as its only argument.

In addition to support for more version control system, this new function might also make it possible to add a {b,g}:ale_vcs_roots = 1 configuration which some users might want to set to 0 in some cases to disable the functionality globally or for certain filetypes.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions