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

Issue 6624051: code review 6624051: go/printer: idempotent comment formatting (Closed)

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

Description

go/printer: idempotent comment formatting Also: - Refactored testing framework to permit easier idempotency testing. - Applied gofmt -w src misc This CL depends on CL 6639044 being applied first. Formatting is not idempotent for all files: In those files the comment position has changed (due to missing precise location information) and/or the comment formatting cannot/is not aware of independent code re-formatting. In general it is very hard to make format idempotent when running it in one pass only. Leaving that aside for now. Fixes issue 1835.

Patch Set 1 #

Patch Set 2 : diff -r 97b5f757b30e https://code.google.com/p/go #

Patch Set 3 : diff -r 97b5f757b30e https://code.google.com/p/go #

Patch Set 4 : diff -r 97b5f757b30e https://code.google.com/p/go #

Patch Set 5 : diff -r c1fb176f3ec7 https://code.google.com/p/go #

Patch Set 6 : diff -r 6976c7f91270 https://code.google.com/p/go #

Patch Set 7 : diff -r 1b587887ceb2 https://code.google.com/p/go #

Patch Set 8 : diff -r 1b587887ceb2 https://code.google.com/p/go #

Patch Set 9 : diff -r 1b587887ceb2 https://code.google.com/p/go #

Total comments: 1

Patch Set 10 : diff -r 7a30d6a1d918 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+277 lines, -64 lines) Patch
M src/pkg/go/printer/printer.go View 1 2 3 4 5 6 5 chunks +26 lines, -7 lines 0 comments Download
M src/pkg/go/printer/printer_test.go View 1 2 3 4 5 6 7 7 chunks +93 lines, -57 lines 0 comments Download
A src/pkg/go/printer/testdata/comments2.golden View 1 2 3 4 5 6 1 chunk +79 lines, -0 lines 0 comments Download
A src/pkg/go/printer/testdata/comments2.input View 1 2 3 4 5 6 1 chunk +79 lines, -0 lines 0 comments Download

Messages

Total messages: 3
gri
Hello r@golang.org, rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go
12 years, 5 months ago (2012-10-09 23:03:14 UTC) #1
r
LGTM http://codereview.appspot.com/6624051/diff/6002/src/pkg/go/printer/printer.go File src/pkg/go/printer/printer.go (right): http://codereview.appspot.com/6624051/diff/6002/src/pkg/go/printer/printer.go#newcode454 src/pkg/go/printer/printer.go:454: // The prefix is computed using heuristics such ...
12 years, 5 months ago (2012-10-09 23:42:05 UTC) #2
gri
12 years, 5 months ago (2012-10-10 00:08:50 UTC) #3
*** Submitted as http://code.google.com/p/go/source/detail?r=0558d15b2681 ***

go/printer: idempotent comment formatting

Also:

- Refactored testing framework to permit easier
idempotency testing.

- Applied gofmt -w src misc

This CL depends on CL 6639044 being applied first.

Formatting is not idempotent for all files: In those
files the comment position has changed (due to missing
precise location information) and/or the comment formatting
cannot/is not aware of independent code re-formatting.
In general it is very hard to make format idempotent when
running it in one pass only. Leaving that aside for now.

Fixes issue 1835.

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

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