|
|
|
codereview: gofmt check for non-src/ files
Gives other projects the benefit of the gofmt presubmit.
Results in minor changes in the doc/ directory:
find doc -name \*.go -exec gofmt -d {} \;
Patch Set 1 #Patch Set 2 : diff -r 39de8f482ea8 https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 39de8f482ea8 https://go.googlecode.com/hg/ #Patch Set 4 : diff -r 5dc686c3dda8 https://go.googlecode.com/hg/ #Patch Set 5 : diff -r 5dc686c3dda8 https://go.googlecode.com/hg/ #Total messages: 6
|
crawshaw1
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
|
14 years, 3 months ago (2011年09月29日 15:53:43 UTC) #1 |
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
LGTM - gri On Thu, Sep 29, 2011 at 8:53 AM, <crawshaw@google.com> wrote: > Reviewers: rsc, > > Message: > Hello rsc@golang.org (cc: golang-dev@googlegroups.com), > > I'd like you to review this change to > https://go.googlecode.com/hg/ > > > Description: > codereview: gofmt check for non-src/ files > > Gives other projects the benefit of the gofmt presubmit. > Results in minor changes in the doc/ directory: > find doc -name \*.go -exec gofmt -d {} \; > > Please review this at http://codereview.appspot.com/5158042/ > > Affected files: > M lib/codereview/codereview.py > > > Index: lib/codereview/codereview.py > =================================================================== > --- a/lib/codereview/codereview.py > +++ b/lib/codereview/codereview.py > @@ -1000,7 +1000,7 @@ > > # Check that gofmt run on the list of files does not change them > def CheckGofmt(ui, repo, files, just_warn): > - files = [f for f in files if (f.startswith('src/') or > f.startswith('test/bench/')) and f.endswith('.go')] > + files = [f for f in files if (not f.startswith('test/') or > f.startswith('test/bench/')) and f.endswith('.go')] > if not files: > return > cwd = os.getcwd() > > >
but wait for rsc - gri On Thu, Sep 29, 2011 at 2:47 PM, Robert Griesemer <gri@golang.org> wrote: > LGTM > - gri > > On Thu, Sep 29, 2011 at 8:53 AM, <crawshaw@google.com> wrote: > > Reviewers: rsc, > > > > Message: > > Hello rsc@golang.org (cc: golang-dev@googlegroups.com), > > > > I'd like you to review this change to > > https://go.googlecode.com/hg/ > > > > > > Description: > > codereview: gofmt check for non-src/ files > > > > Gives other projects the benefit of the gofmt presubmit. > > Results in minor changes in the doc/ directory: > > find doc -name \*.go -exec gofmt -d {} \; > > > > Please review this at http://codereview.appspot.com/5158042/ > > > > Affected files: > > M lib/codereview/codereview.py > > > > > > Index: lib/codereview/codereview.py > > =================================================================== > > --- a/lib/codereview/codereview.py > > +++ b/lib/codereview/codereview.py > > @@ -1000,7 +1000,7 @@ > > > > # Check that gofmt run on the list of files does not change them > > def CheckGofmt(ui, repo, files, just_warn): > > - files = [f for f in files if (f.startswith('src/') or > > f.startswith('test/bench/')) and f.endswith('.go')] > > + files = [f for f in files if (not f.startswith('test/') or > > f.startswith('test/bench/')) and f.endswith('.go')] > > if not files: > > return > > cwd = os.getcwd() > > > > > > >
Ping. On Thu, Sep 29, 2011 at 2:48 PM, Robert Griesemer <gri@golang.org> wrote: > but wait for rsc > - gri > > > On Thu, Sep 29, 2011 at 2:47 PM, Robert Griesemer <gri@golang.org> wrote: > >> LGTM >> - gri >> >> On Thu, Sep 29, 2011 at 8:53 AM, <crawshaw@google.com> wrote: >> > Reviewers: rsc, >> > >> > Message: >> > Hello rsc@golang.org (cc: golang-dev@googlegroups.com), >> > >> > I'd like you to review this change to >> > https://go.googlecode.com/hg/ >> > >> > >> > Description: >> > codereview: gofmt check for non-src/ files >> > >> > Gives other projects the benefit of the gofmt presubmit. >> > Results in minor changes in the doc/ directory: >> > find doc -name \*.go -exec gofmt -d {} \; >> > >> > Please review this at http://codereview.appspot.com/5158042/ >> > >> > Affected files: >> > M lib/codereview/codereview.py >> > >> > >> > Index: lib/codereview/codereview.py >> > =================================================================== >> > --- a/lib/codereview/codereview.py >> > +++ b/lib/codereview/codereview.py >> > @@ -1000,7 +1000,7 @@ >> > >> > # Check that gofmt run on the list of files does not change them >> > def CheckGofmt(ui, repo, files, just_warn): >> > - files = [f for f in files if (f.startswith('src/') or >> > f.startswith('test/bench/')) and f.endswith('.go')] >> > + files = [f for f in files if (not f.startswith('test/') or >> > f.startswith('test/bench/')) and f.endswith('.go')] >> > if not files: >> > return >> > cwd = os.getcwd() >> > >> > >> > >> > >
LGTM
*** Submitted as http://code.google.com/p/go/source/detail?r=4c556044efce *** codereview: gofmt check for non-src/ files Gives other projects the benefit of the gofmt presubmit. Results in minor changes in the doc/ directory: find doc -name \*.go -exec gofmt -d {} \; R=rsc, gri CC=golang-dev http://codereview.appspot.com/5158042 Committer: Robert Griesemer <gri@golang.org>