From 6f9e2d188daf3713fa0a69453167e41605fb9b0b Mon Sep 17 00:00:00 2001 From: Shuhei Takahashi Date: Tue, 26 Nov 2024 20:37:29 +0900 Subject: [PATCH] Support --incompatible_disallow_empty_glob Fixes #25. --- lint/defs.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lint/defs.bzl b/lint/defs.bzl index 6204913..813e98a 100644 --- a/lint/defs.bzl +++ b/lint/defs.bzl @@ -26,9 +26,9 @@ def buildifier_test(name, srcs, type = "auto", **kwargs): ) def lint_all(): - py_srcs = native.glob(["*.py"]) + py_srcs = native.glob(["*.py"], allow_empty = True) if py_srcs: pycodestyle_test(name = "pycodestyle_test", srcs = py_srcs) - bzl_srcs = native.glob(["WORKSPACE", "WORKSPACE.bazel", "BUILD", "BUILD.bazel", "*.bzl"]) + bzl_srcs = native.glob(["WORKSPACE", "WORKSPACE.bazel", "BUILD", "BUILD.bazel", "*.bzl"], allow_empty = True) if bzl_srcs: buildifier_test(name = "buildifier_test", srcs = bzl_srcs)