load("//tools/lint:lint.bzl", "add_lint_tests")
load("//tools/skylark:drake_py.bzl", "drake_py_unittest")

# Drake must redistribute any code changes, per Ipopts's EPL-2.0 license.
# Here we'll glob all of the patch files from their conventional home.
#
# The glob might be empty if we don't have any patches at the moment,
# but we'll keep the boilerplate here as a fail-safe.
filegroup(
    name = "patches",
    srcs = glob(
        ["patches/**"],
        allow_empty = True,
    ),
    visibility = ["//visibility:public"],
)

drake_py_unittest(
    name = "lint_test",
    data = [
        ":package.BUILD.bazel",
        "//tools/wheel:image/dependencies/projects.cmake",
        "@ipopt_internal_fromsource//:drake_repository_metadata.json",
        "@ipopt_internal_fromsource//:src/Makefile.am",
    ],
    tags = ["lint"],
)

add_lint_tests()
