gazelle rule: add data attribute, apply expand_location to extra_args (#871)
gazelle rule: add data attribute, apply expand_location to extra_args (#871)

This enables callers to pass labels of generated files to Gazelle for use in
arguments. For example:

  gazelle(
    name = "gazelle",
    extra_args = ["-repo_config=$(location :deps)"],
    data = [":deps"],
 )

We also pass extra_args through ctx.expand_location to resolve such expressions.

Fixes #867
bazelbuild/bazel-gazelle,bazelbuild/bazel-gazelle