Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(142)

Issue 758041: code review 758041: godoc: don't convert multi-line functions into one-line... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years ago by gri
Modified:
16 years ago
Reviewers:
CC:
rsc, rsc1, golang-dev, ken2, r
Visibility:
Public.

Description

godoc: don't convert multi-line functions into one-liners by default - new heuristic: if both the opening { and closing } braces are on the same line, and the function body doesn't contain comments or is other- wise too long (e.g. signature too long), it is formatted as a one-line function - related cleanups along the way - gofmt -w src misc led to no additional changes as expected

Patch Set 1 #

Patch Set 2 : code review 758041: godoc: #

Patch Set 3 : code review 758041: godoc: don't convert multi-line functions into one-line... #

Patch Set 4 : code review 758041: godoc: don't convert multi-line functions into one-line... #

Patch Set 5 : code review 758041: godoc: don't convert multi-line functions into one-line... #

Total comments: 1

Patch Set 6 : code review 758041: godoc: don't convert multi-line functions into one-line... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+150 lines, -64 lines) Patch
M src/pkg/go/printer/nodes.go View 1 2 3 7 chunks +33 lines, -19 lines 0 comments Download
M src/pkg/go/printer/printer.go View 8 chunks +18 lines, -18 lines 0 comments Download
M src/pkg/go/printer/testdata/comments.golden View 1 2 chunks +9 lines, -2 lines 0 comments Download
M src/pkg/go/printer/testdata/comments.input View 1 chunk +4 lines, -0 lines 0 comments Download
M src/pkg/go/printer/testdata/declarations.golden View 1 2 chunks +22 lines, -5 lines 0 comments Download
M src/pkg/go/printer/testdata/declarations.input View 1 chunk +9 lines, -4 lines 0 comments Download
M src/pkg/go/printer/testdata/expressions.golden View 1 chunk +22 lines, -5 lines 0 comments Download
M src/pkg/go/printer/testdata/expressions.input View 1 chunk +11 lines, -6 lines 0 comments Download
M src/pkg/go/printer/testdata/expressions.raw View 1 chunk +22 lines, -5 lines 0 comments Download

Messages

Total messages: 6
gri
Hello rsc (cc: golang-dev@googlegroups.com, ken2, r), I'd like you to review this change.
16 years ago (2010-03-25 20:49:34 UTC) #1
rsc1
http://codereview.appspot.com/758041/diff/10001/11005 File src/pkg/go/printer/testdata/declarations.golden (right): http://codereview.appspot.com/758041/diff/10001/11005#newcode359 src/pkg/go/printer/testdata/declarations.golden:359: type _ struct { /* this comment should be ...
16 years ago (2010-03-25 21:03:03 UTC) #2
gri
On Thu, Mar 25, 2010 at 2:03 PM, <rsc@google.com> wrote: > > http://codereview.appspot.com/758041/diff/10001/11005 > File ...
16 years ago (2010-03-25 21:50:45 UTC) #3
rsc1
is it only when there's a /* */ comment involved? i.e. does struct { x ...
16 years ago (2010-03-25 21:53:38 UTC) #4
rsc1
LGTM
16 years ago (2010-03-25 23:50:04 UTC) #5
gri
16 years ago (2010-03-25 23:59:07 UTC) #6
*** Submitted as http://code.google.com/p/go/source/detail?r=1e6a28abcdf4 ***

godoc: don't convert multi-line functions into one-liners by default

- new heuristic: if both the opening { and closing } braces are on the
  same line, and the function body doesn't contain comments or is other-
  wise too long (e.g. signature too long), it is formatted as a one-line
  function

- related cleanups along the way

- gofmt -w src misc led to no additional changes as expected

R=rsc, rsc1
CC=golang-dev, ken2, r
http://codereview.appspot.com/758041
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b