Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
deeb1b36
Commit
deeb1b36
authored
Jan 30, 2012
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
codereview: ignore test files during 'hg gofmt'
R=golang-dev, gri CC=golang-dev
https://golang.org/cl/5581047
parent
9c497443
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
codereview.py
lib/codereview/codereview.py
+5
-2
No files found.
lib/codereview/codereview.py
View file @
deeb1b36
...
...
@@ -895,7 +895,7 @@ def CheckFormat(ui, repo, files, just_warn=False):
# 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
(
not
f
.
startswith
(
'test/'
)
or
f
.
startswith
(
'test/bench/'
))
and
f
.
endswith
(
'.go'
)]
files
=
gofmt_required
(
files
)
if
not
files
:
return
cwd
=
os
.
getcwd
()
...
...
@@ -1749,7 +1749,7 @@ def gofmt(ui, repo, *pats, **opts):
return
codereview_disabled
files
=
ChangedExistingFiles
(
ui
,
repo
,
pats
,
opts
)
files
=
[
f
for
f
in
files
if
f
.
endswith
(
".go"
)]
files
=
gofmt_required
(
files
)
if
not
files
:
return
"no modified go files"
cwd
=
os
.
getcwd
()
...
...
@@ -1766,6 +1766,9 @@ def gofmt(ui, repo, *pats, **opts):
raise
hg_util
.
Abort
(
"gofmt: "
+
ExceptionDetail
())
return
def
gofmt_required
(
files
):
return
[
f
for
f
in
files
if
(
not
f
.
startswith
(
'test/'
)
or
f
.
startswith
(
'test/bench/'
))
and
f
.
endswith
(
'.go'
)]
#######################################################################
# hg mail
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment