Function: bazel--rule-target-location

bazel--rule-target-location is a natively compiled function defined in bazel.el.

Signature

(bazel--rule-target-location BUILD-FILE NAME)

Documentation

Return an ‘xref-location’ for a rule target definition within a BUILD file.

The name of the BUILD file is BUILD-FILE, and NAME is the local name of the rule target. If a definition for NAME doesn’t seem to exist in BUILD-FILE, return a location referring to an arbitrary position within the BUILD file.

Source Code

;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(defun bazel--rule-target-location (build-file name)
  "Return an ‘xref-location’ for a rule target definition within a BUILD file.
The name of the BUILD file is BUILD-FILE, and NAME is the local
name of the rule target.  If a definition for NAME doesn’t seem to exist
in BUILD-FILE, return a location referring to an arbitrary position
within the BUILD file."
  (declare (ftype (function (string string) xref-location)))
  (cl-check-type build-file string)
  (cl-check-type name string)
  (bazel--xref-location build-file (lambda () (bazel--find-rule-target name))))