Function: bazel-find-workspace-file
bazel-find-workspace-file is an interactive and natively compiled
function defined in bazel.el.
Signature
(bazel-find-workspace-file)
Documentation
Find the WORKSPACE file for the current Bazel repository.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/ws8pkszjvcad1rgzqw6wja7qxacylfhn-emacs-packages-deps/share/emacs/site-lisp/elpa/bazel-20261002.1510/bazel.el
(defun bazel-find-workspace-file ()
"Find the WORKSPACE file for the current Bazel repository."
(declare (ftype (function () null))
(interactive-only t))
(interactive)
(let* ((source-file
(or buffer-file-name default-directory
(user-error "Buffer doesn’t visit a file or directory")))
(root (or (bazel--repository-root source-file)
(user-error "File is not in a Bazel repository")))
(workspace-file
(or (bazel--locate-workspace-file root)
(user-error "No WORKSPACE file found"))))
(find-file workspace-file))
nil)