gopls/internal/bug: fix a bug in the bug package

After refactoring the public API of the bug package, the skip value used
in runtime.Caller became inaccurate for some new APIs. Fix this so that
we can actually see where the bug occurred.

Change-Id: Ie301084187dd9309895b2541c5dfc3b5ec4c63ba
Reviewed-on: https://go-review.googlesource.com/c/tools/+/472135
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/internal/bug/bug.go b/internal/bug/bug.go
index b974e88..c18d35a 100644
--- a/internal/bug/bug.go
+++ b/internal/bug/bug.go
@@ -46,21 +46,25 @@
 
 // Reportf reports a formatted bug message.
 func Reportf(format string, args ...interface{}) {
-	Report(fmt.Sprintf(format, args...), nil)
+	report(fmt.Sprintf(format, args...), nil)
 }
 
 // Errorf calls fmt.Errorf for the given arguments, and reports the resulting
 // error message as a bug.
 func Errorf(format string, args ...interface{}) error {
 	err := fmt.Errorf(format, args...)
-	Report(err.Error(), nil)
+	report(err.Error(), nil)
 	return err
 }
 
 // Report records a new bug encountered on the server.
 // It uses reflection to report the position of the immediate caller.
 func Report(description string, data Data) {
-	_, file, line, ok := runtime.Caller(1)
+	report(description, data)
+}
+
+func report(description string, data Data) {
+	_, file, line, ok := runtime.Caller(2) // all exported reporting functions call report directly
 
 	key := "<missing callsite>"
 	if ok {