Skip to content

Commit

Permalink
fixed linting of subpackages
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 committed Sep 1, 2018
1 parent 1abdcee commit 1b00011
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions Makefile
@@ -1,4 +1,3 @@
# TODO: lint and fmt sub packages
PKG := github.com/michael1011/lightningtip

GOBUILD := go build -v
Expand All @@ -10,7 +9,7 @@ LINT_BIN := $(GO_BIN)/gometalinter.v2

HAVE_DEP := $(shell command -v $(DEP_BIN) 2> /dev/null)

GOLIST := go list $(PKG)/... | grep -v '/vendor/'
LINT_LIST = $(go list -f '{{.Dir}}' ./...)

GREEN := "\\033[0;32m"
NC := "\\033[0m"
Expand All @@ -19,7 +18,7 @@ define print
echo $(GREEN)$1$(NC)
endef

LINT = $(LINT_BIN) \
LINT = $(LINT_BIN) $(LINT_LIST) \
--disable-all \
--enable=gofmt \
--enable=vet \
Expand Down Expand Up @@ -59,7 +58,7 @@ scratch: dep build

fmt:
@$(call print, "Formatting source.")
$(GOLIST) | go fmt -x
gofmt -s -w .

lint: $(LINT_BIN)
@$(call print, "Linting source.")
Expand Down
2 changes: 1 addition & 1 deletion lightningtip.go
Expand Up @@ -60,7 +60,7 @@ type errorResponse struct {
}

// TODO: add version flag
// TODO: add option to show URI of Lightning node
// TODO: don't start when "--help" flag is provided
func main() {
initLog()

Expand Down

0 comments on commit 1b00011

Please sign in to comment.