cool-easter-32542
03/10/2025, 3:12 PM*_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