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

Issue 4307045: code review 4307045: go/printer/gofmt: remove special case for multi-line ra... (Closed)

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

Description

go/printer/gofmt: remove special case for multi-line raw strings As a special case, multi-line raw strings (i.e., strings in `` quotes) were not indented if they were the only token on a line. This heuristic was meant to improve formatting for multi-line raw strings where sub- sequent lines are not indented at the level of the surrounding code. Multiple people have complained about this. Removing the heuristic again because it makes the formatting more regular, easier to under- stand, and simplifies the implementation. - manual changes to ebnf/ebnf_test.go for readability - gofmt -w src misc Fixes issue 1643.

Patch Set 1 #

Patch Set 2 : diff -r ef9205423904 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r ef9205423904 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r ef9205423904 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r ef9205423904 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r ef9205423904 https://go.googlecode.com/hg/ #

Patch Set 7 : diff -r 018fe12531d1 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -103 lines) Patch
M src/cmd/gofix/httpserver.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/cmd/gofix/netdial.go View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M src/cmd/gofix/procattr.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/ebnf/ebnf_test.go View 1 2 3 1 chunk +16 lines, -21 lines 0 comments Download
M src/pkg/go/printer/printer.go View 1 2 3 4 5 9 chunks +12 lines, -54 lines 0 comments Download
M src/pkg/go/printer/testdata/expressions.golden View 1 4 chunks +9 lines, -9 lines 0 comments Download
M src/pkg/go/printer/testdata/expressions.input View 1 4 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/go/printer/testdata/expressions.raw View 1 5 chunks +11 lines, -10 lines 0 comments Download

Messages

Total messages: 4
gri
Hello r, rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
14 years, 7 months ago (2011-03-29 22:54:44 UTC) #1
r
leaving for rsc. his code seems to get hit hard.
14 years, 7 months ago (2011-03-30 00:05:12 UTC) #2
rsc
LGTM
14 years, 7 months ago (2011-03-30 00:47:11 UTC) #3
gri
14 years, 7 months ago (2011-03-30 01:31:05 UTC) #4
*** Submitted as http://code.google.com/p/go/source/detail?r=342e3b11f21a ***

go/printer/gofmt: remove special case for multi-line raw strings

As a special case, multi-line raw strings (i.e., strings in `` quotes)
were not indented if they were the only token on a line. This heuristic
was meant to improve formatting for multi-line raw strings where sub-
sequent lines are not indented at the level of the surrounding code.
Multiple people have complained about this. Removing the heuristic
again because it makes the formatting more regular, easier to under-
stand, and simplifies the implementation.

- manual changes to ebnf/ebnf_test.go for readability
- gofmt -w src misc

Fixes issue 1643.

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

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