[FR]: Support adding `testonly` to a glob of folders/files with gazelle plugin
Opened this issue · 0 comments
Aghassi commented
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.