If id is a number greater than 150k, then it is a Rietveld CL, otherwise
treat it as a Gerrit change id.
Also add support for /cl/ID/, because go commit 0edafefc36 uses this
form.
Change-Id: I46575e3284faaa727e346b34bbc46ab248cf12b3
Signed-off-by: Shenghou Ma <minux@golang.org>
Reviewed-on: https://go-review.googlesource.com/1283
Reviewed-by: Andrew Gerrand <adg@golang.org>
While we're at it, fix some bad tags and wrap one long line.
Change-Id: I4808b4645b7d18c4320b0969ab53fb244d6f169d
Reviewed-on: https://go-review.googlesource.com/1520
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This isn't exposed through the godoc binary, as it will only be
used by the Google-specific deployment of godoc.
Change-Id: Id5808f3adcb7eb36a7ccd6e4960ce3f01179fe51
Reviewed-on: https://go-review.googlesource.com/1567
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Rewrite performed with this command:
sed -i '' 's_code.google.com/p/go\._golang.org/x/_g' \
$(grep -lr 'code.google.com/p/go.' *)
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/170920043
The bug it refers to is now fixed, and the alternative
implementation it suggests is not an improvement.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/151620044
Previously type errors were reported via the web interface but
not logged, but this led to confusion as to why SSA
construction and/or pointer analysis were not attempted.
LGTM=gri
R=gri, bradfitz
CC=golang-codereviews
https://golang.org/cl/136660043
Today I learned that getElementByClass returns an
HTMLContainer, not an array, so the for loop was iterating its
properties, which include:
- the methods of the type, which were filtered out by the condition;
- the array-like integer indices of the elements, which we want;
- the ids of the same elements (!), which we weren't expecting.
The net result is that various functions were called twice,
causing the tree to be double-populated and clicks to cause
and expand+collapse.
It's a miracle to me that any JS program even approximately works.
Fixesgolang/go#8237
LGTM=bradfitz
R=gri, bradfitz
CC=golang-codereviews
https://golang.org/cl/141540043
To avoid breaking URLs, we redirect /src/pkg/* to /src/*.
The URL /pkg is now the "directory" /src, which triggers the
"Packages" index.
All other references to "src/pkg" are now gone,
except a number in the namespace documentation which are
probably still illustrative.
Tested: go test cmd/godoc godoc
Manual inspection of src and src/pkg pages.
with GOROOT and GOPATH packages
-analysis
/AUTHORS file URL still works
LGTM=bradfitz, adg
R=bradfitz, adg
CC=golang-codereviews
https://golang.org/cl/141770044
It returns the value formerly returned by Pkg(), i.e. the imported package.
Pkg() now returns the package enclosing the import statement,
which is consistent with all other Objects.
Fixesgolang/go#8628.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/136090043
golang.org now serves HTTPS,
so the scripts should work
with either HTTP ot HTTPS.
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/111640043
Right now they're all "Global" so you can't click use the table of
contents headings for "Types", "Functions", and "Methods".
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/118100043
Without it, no value appears to be sent on NewTicker/NewTimer channels.
+ test
Also:
- add (callgraph.Edge).{Description,Pos} convenience methods
to simplify client code when Site==nil.
LGTM=gri
R=gri, friestein68503
CC=golang-codereviews
https://golang.org/cl/112610043
Also:
- declare PackageInfo, FileInfo types to simplify API.
- update docs:
eliminate this TODO item
document improved analysis times
state that -analysis=pointer implies -analysis=type
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/112770044
This fixes an issue where Firefox users can't ctrl-tab out to switch
to other tabs when using the playground.
LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/106020043
Before, Load() would just fail. Now, it gathers all frontend
errors (not just the first go/types error) in PackageInfo.Errors.
There are still cases where Load() can fail hard, e.g. errors in x_test.go
files. That case is trickier to fix and remains a TODO item.
Also, make godoc display all scanner/parser/type errors in the source view.
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/108940043
In command godoc, set IndexEnabled when the -write_index flag is set.
Previously you would need to (unintuitively) set the -http flag to
achieve this.
In package godoc, set up the FS tree before loading the index, and
then return before starting the index refresh loop. Previously the
index would be loaded and then immediately refreshed, negating the
benefits of the on-disk index.
TBR=bradfitz
R=golang-codereviews
CC=golang-codereviews
https://golang.org/cl/103370046
This code was moved to a throttle method on Corpus but I guess it was
never deleted.
LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=golang-codereviews
https://golang.org/cl/102350043
Also:
- extend Parent() to all Values and add to interface:
(Builtin/Const/Global => nil; Function => Enclosing)
- hide Function.Enclosing since it's now redundant wrt Parent()
- make (*Function).String robust for synthetics without pkg object
LGTM=gri
R=gri
CC=golang-codereviews, khr
https://golang.org/cl/87580044
The text and images are "baked in" to the godoc executable's
rodata section (~300KB) and are accessible from the godoc
server itself at /lib/godoc/analysis/help.html.
In due course, the page will become visible at
http://golang.org/lib/godoc/analysis/help.html, which will be
the canonical location for this doc (in announcements, etc).
The page is temporarily visible here, for those on the Google corp network:
http://172.26.104.127:7777/lib/godoc/analysis/help.html
Also:
- add link to new doc from source view pages.
- document -analysis flag in cmd/godoc/doc.go
- fix indentation of -analysis flag's help string
LGTM=gri
R=gri, bgarcia, r
CC=golang-codereviews
https://golang.org/cl/87110045
Also:
- remove stale comment about line numbers.
- log a warning if file's package root not found.
LGTM=bgarcia
R=bgarcia
CC=golang-codereviews
https://golang.org/cl/88510044
These were removed when adding the -analysis flag (CL
60540044), ostensibly for performance, but I can't reproduce
the serious slowdowns I saw then. In any case, they are
needed for certain URLs.
Fixesgolang/go#7743
LGTM=bgarcia
R=bgarcia
CC=golang-codereviews
https://golang.org/cl/86150043