<#22067 tailored source and test file name pattern...
# github-notifications
c
#22067 tailored source and test file name patterns should be configurable Issue created by vito-laurenza-zocdoc Is your feature request related to a problem? Please describe. There is an existing pattern in the core code where tailor for
*_sources
and
*_tests
targets rely on hard coded constants in the core code. e.g., for
javascript_sources
and `javascript_tests`: https://github.com/pantsbuild/pants/blob/6c41074/src/python/pants/backend/javascript/target_types.py#L24-L25 Repos using other naming conventions (e.g.
*-tests.js
) cannot easily tailor targets for these files without jumping through some hoops (e.g. macros and/or alias mapping). Describe the solution you'd like It would be a much nicer UX if these file-based patterns were exposed as configurable, perhaps via subsystem options, e.g.
pants tailor --javascript-test-file-extensions='["*-tests.js, "*-test.js"]' ::
Describe alternatives you've considered We've considered using macros, alias mapping, internal tailor rule implementation, and/or using
__defaults__
, but feel that none of these are very ergonomic or desirable for long term maintenance. pantsbuild/pants