Function: bazel--target-kind

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

Signature

(bazel--target-kind)

Documentation

Return the rule kind of the rule target at point.

This is a heuristic. Return nil if the rule kind can’t be determined.

Source Code

;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(defun bazel--target-kind ()
  "Return the rule kind of the rule target at point.
This is a heuristic.  Return nil if the rule kind can’t be determined."
  (declare (ftype (function () (or null string))))
  (save-excursion
    (let ((case-fold-search nil)
          (search-spaces-regexp nil))
      (python-nav-beginning-of-statement)
      (when (looking-at (rx symbol-start
                            (group (+ (or (syntax word) (syntax symbol))))
                            (* blank) ?\())
        (match-string-no-properties 1)))))