buf
buf copied to clipboard
`path not exist` errors from `allowNotExist` check shows root relative paths instead of relative paths to working directory
Currently, when we do checks for allowNotExist
for paths provided through the --path
and --exclude-path
flags, we only print out the root relative path, example:
https://github.com/bufbuild/buf/blob/94997f821e98f05f0cf63aa0901cadb9fe567d57/private/bufpkg/bufmodule/targeting_module.go#L155
We should be printing out the path relative to the user's working directory for more clarity in debugging.
Along the same lines, when we are returning errors to users around imports, we should indicate that in the error: https://github.com/bufbuild/buf-lint-action/issues/10
I don't believe this path will necessarily be relative to a user's working directory - this could be within a tarball, git repo, etc.