docs: Add --incompatible_disallow_empty_glob to correctness.bazelrc (#524)
This commit is contained in:
parent
89d8605502
commit
fc3c3181f3
|
@ -60,3 +60,9 @@ query --experimental_allow_tags_propagation
|
|||
# https://github.com/bazelbuild/bazel/issues/10076.
|
||||
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_default_to_explicit_init_py
|
||||
build --incompatible_default_to_explicit_init_py
|
||||
|
||||
# Set default value of `allow_empty` to `False` in `glob()`. This prevents a common mistake when
|
||||
# attempting to use `glob()` to match files in a subdirectory that is opaque to the current package
|
||||
# because it contains a BUILD file. See https://github.com/bazelbuild/bazel/issues/8195.
|
||||
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_disallow_empty_glob
|
||||
common --incompatible_disallow_empty_glob
|
||||
|
|
|
@ -60,3 +60,9 @@ query --experimental_allow_tags_propagation
|
|||
# https://github.com/bazelbuild/bazel/issues/10076.
|
||||
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_default_to_explicit_init_py
|
||||
build --incompatible_default_to_explicit_init_py
|
||||
|
||||
# Set default value of `allow_empty` to `False` in `glob()`. This prevents a common mistake when
|
||||
# attempting to use `glob()` to match files in a subdirectory that is opaque to the current package
|
||||
# because it contains a BUILD file. See https://github.com/bazelbuild/bazel/issues/8195.
|
||||
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_disallow_empty_glob
|
||||
common --incompatible_disallow_empty_glob
|
||||
|
|
|
@ -133,7 +133,7 @@ def _file_exists(path):
|
|||
label = _to_label(path)
|
||||
file_abs = "%s/%s" % (label.package, label.name)
|
||||
file_rel = file_abs[len(native.package_name()) + 1:]
|
||||
file_glob = native.glob([file_rel], exclude_directories = 1)
|
||||
file_glob = native.glob([file_rel], exclude_directories = 1, allow_empty = True)
|
||||
return len(file_glob) > 0
|
||||
|
||||
def _default_timeout(size, timeout):
|
||||
|
|
|
@ -60,3 +60,9 @@ query --experimental_allow_tags_propagation
|
|||
# https://github.com/bazelbuild/bazel/issues/10076.
|
||||
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_default_to_explicit_init_py
|
||||
build --incompatible_default_to_explicit_init_py
|
||||
|
||||
# Set default value of `allow_empty` to `False` in `glob()`. This prevents a common mistake when
|
||||
# attempting to use `glob()` to match files in a subdirectory that is opaque to the current package
|
||||
# because it contains a BUILD file. See https://github.com/bazelbuild/bazel/issues/8195.
|
||||
# Docs: https://bazel.build/reference/command-line-reference#flag--incompatible_disallow_empty_glob
|
||||
common --incompatible_disallow_empty_glob
|
||||
|
|
Loading…
Reference in New Issue