Skip to content

Support for pre-commit with monorepos that use [tool.uv.sources] (non-workspace layout) #62

@aeroyorch

Description

@aeroyorch

Is there a way to use the official uv pre-commit hooks in a monorepo with multiple interdependent apps/libraries wired via [tool.uv.sources], but without using uv workspaces?

I saw an example in the README.md showing a hardcoded subdirectory path, but doing this for every project in a growing monorepo could become cumbersome.

From reading the docs, the pre-commit integration appears to assume either a single project or a workspace. In our setup we intentionally do not use workspaces (as suggested under “When not to use workspaces”), and rely on [tool.uv.sources] to link local packages.

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions