Hey, I have a files target that is a glob of YAML ...
# general
r
Hey, I have a files target that is a glob of YAML files that takes any source with the extension
.yaml
or
.yml
, though we generally stick to
.yaml
, so I am getting a warning about unmatched globs for
*.yml
- is there a way to tell pants that this warning is unnecessary for this particular target?
h
You can squelch specific warnings with this option: https://www.pantsbuild.org/docs/reference-global#ignore_warnings
But that is obviously just a band aid
not a real solution
You can also turn off warnings for unmatched globs with this option: https://www.pantsbuild.org/docs/reference-global#unmatched_build_file_globs
Probably closer to what you want
f
Would it make sense to have
unmatched_build_file_globs
be a field on the target? (which could then be overriden with
__defaults__
)
☝️ 2
r
Yeah that would be ideal IMO.
h
Or, I could imagine glob syntax, like a
~
prefix to say "maybe this glob" or something
c
r
The
~
syntax would be nifty
🙏 1