Skip to content

[FR]: Support adding testonly to a glob of folders/files with gazelle plugin #669

Closed
@Aghassi

Description

@Aghassi

What is the current behavior?

You can't isolate out a folder and say "for this folder, please give me source targets and add testonly to make sure this folder doesn't get used in production". This means we can do build file generation on a folder like mocks but we have to manually add testonly.

Describe the feature

We should be able to pass a directive like #gazelle:treat_as_testonly **/mocks/** that will generate targets in any mocks folder found, but add testonly to the ts_project target. This prevents anything from mocks being used downstream and ending up in production.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestneed: discussionWe have to do some design work in a meeting

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions