提交 fa2ba492 编写于 作者: M Mislav Marohnić

`make fmt`

上级 54262e66
SOURCES = $(shell script/build files)
SOURCES_FMT = $(shell script/build files | cut -d/ -f1-2 | sort -u)
HELP_CMD = \
man/hub-alias.1 \
......@@ -26,7 +27,7 @@ HELP_ALL = man/hub.1 $(HELP_CMD) $(HELP_EXT)
TEXT_WIDTH = 87
.PHONY: clean test test-all man-pages
.PHONY: clean test test-all man-pages fmt
all: bin/hub
......@@ -42,6 +43,10 @@ test-all: bin/cucumber
bin/ronn bin/cucumber:
script/bootstrap
fmt:
go fmt $(filter %.go,$(SOURCES_FMT))
go fmt $(filter-out %.go,$(SOURCES_FMT))
man-pages: $(HELP_ALL:=.ronn) $(HELP_ALL) $(HELP_ALL:=.txt)
%.txt: %.ronn
......
#!/bin/sh
set -e
files="$(script/build files | cut -d/ -f1-2 | sort -u)"
grep '.go$' <<<"$files" | xargs go fmt
grep -v '.go$' <<<"$files" | xargs go fmt
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册