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

Issue 241041: code review 241041: gofmt: modified algorithm for alignment of multi-line c... (Closed)

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

Description

gofmt: modified algorithm for alignment of multi-line composite/list entries - only manual changes are in src/pkg/go/printer/nodes.go - use a heuristic to determine "outliers" such that not entire composites are forced to align with them - improves several places that were not unligned before due too simple heuristic - unalignes some cases that contain "outliers" - gofmt -w src misc Fixes issue 644.

Patch Set 1 #

Patch Set 2 : code review 241041: gofmt: modified algorithm for alignment of multi-line c... #

Patch Set 3 : code review 241041: gofmt: modified algorithm for alignment of multi-line c... #

Patch Set 4 : code review 241041: gofmt: modified algorithm for alignment of multi-line c... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+278 lines, -185 lines) Patch
M src/pkg/asn1/asn1_test.go View 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/crypto/x509/x509.go View 1 chunk +4 lines, -4 lines 0 comments Download
M src/pkg/debug/dwarf/type_test.go View 1 2 1 chunk +14 lines, -14 lines 0 comments Download
M src/pkg/exp/eval/stmt.go View 1 chunk +5 lines, -5 lines 0 comments Download
M src/pkg/go/printer/nodes.go View 1 2 4 chunks +69 lines, -24 lines 0 comments Download
M src/pkg/go/printer/testdata/declarations.golden View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
M src/pkg/go/printer/testdata/declarations.input View 1 2 3 1 chunk +24 lines, -0 lines 0 comments Download
M src/pkg/http/readrequest_test.go View 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/http/request_test.go View 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/http/requestwrite_test.go View 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/http/status.go View 1 2 1 chunk +17 lines, -17 lines 0 comments Download
M src/pkg/syscall/zerrors_nacl_386.go View 1 chunk +85 lines, -85 lines 0 comments Download
M src/pkg/unicode/tables.go View 1 2 1 chunk +31 lines, -31 lines 0 comments Download

Messages

Total messages: 6
gri
Hello rsc, r (cc: golang-dev@googlegroups.com), I'd like you to review this change.
15 years ago (2010-03-05 00:35:14 UTC) #1
rsc
I'm not sure. These look awkward: http://codereview.appspot.com/241041/diff/2001/3005?context=10&column_width=80 http://codereview.appspot.com/241041/diff/2001/3018?context=10&column_width=80 http://codereview.appspot.com/241041/diff/2001/3007?context=10&column_width=80 The old rule was very easy ...
15 years ago (2010-03-05 00:56:55 UTC) #2
gri
PTAL. Changed the line size ratio from 2 to 4 - this leaves existing alignment ...
15 years ago (2010-03-05 01:10:28 UTC) #3
rsc
LGTM looks much better
15 years ago (2010-03-05 01:15:57 UTC) #4
r2
LGTM
15 years ago (2010-03-05 01:20:52 UTC) #5
gri
15 years ago (2010-03-05 01:37:21 UTC) #6
*** Submitted as http://code.google.com/p/go/source/detail?r=b149459ad2ff ***

gofmt: modified algorithm for alignment of multi-line composite/list entries
- only manual changes are in src/pkg/go/printer/nodes.go
- use a heuristic to determine "outliers" such that not entire composites are
  forced to align with them
- improves several places that were not unligned before due too simple heuristic
- unalignes some cases that contain "outliers"
- gofmt -w src misc

Fixes issue 644.

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

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