[Continuing Discussion] python_no_test_files
directive
#1826
Labels
gazelle
Gazelle plugin related issues
python_no_test_files
directive
#1826
This is a continuation of the discussion from #1819 (comment).
馃殌 feature request
Relevant Rules
Description
The summary of the discussion in #1819 (comment) so far is:
python_test_file_pattern
accept no value is unintuitive and should raise an error. feat(gazelle): Add "python_test_file_pattern" directive聽#1819 includes this.python_test_file_pattern
back to "default" should be done manually, not through magic strings.# gazelle:python_test_file_pattern *_test.py,test_*.py
py_test
targets but should still be processed as py_library or py_binary (see example below).python_test_file_pattern
to a value that ends in something other than.py
, such asgazelle:python_test_file_pattern ignore_me.txt
. This will work because a prior check (here and here) asserts that the files being processed by gazelle end in.py
.python_no_test_files
directive.How does
python_no_test_files
behave? Does it:python_test_file_pattern
? orpython_test_file_pattern
topy_library
orpy_binary
(if they haveif __name__ ...
)?Describe the solution you'd like
With behavior (1), there's still a feature gap for the example case above, and the workaround feels a bit hacky.
For behavior (2) we'd probably want to name the directive something else.
Describe alternatives you've considered
Using
python_ignore_files
and then manually generating the py_library targets for files that matchpython_test_file_pattern
. This is less than ideal when adding things to large projects.The text was updated successfully, but these errors were encountered: