Skip to content

Commit

Permalink
Added golangci support
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Juqueira committed Feb 20, 2020
1 parent cf8ac25 commit 36688de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
SHELL=/bin/bash

# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
Expand Down Expand Up @@ -37,7 +39,9 @@ lint: format
${GOPATH}/bin/golangci-lint run

# Build commands
build: clean-target
build:
$(call copy-support)
$(call compile)
test:
$(GOTEST) -v ./...
Expand Down
4 changes: 4 additions & 0 deletions pkg/templates/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ func applyProjectToTemplates(p *Project, path string) error {
return os.Rename(path, strings.ReplaceAll(path, "gitkeep", ".gitkeep"))
}

if info.Name() == "golangci.yml" {
return os.Rename(path, strings.ReplaceAll(path, "golangci.yml", ".golangci.yml"))
}

if !strings.Contains(info.Name(), "-tpl") {
return nil
}
Expand Down

0 comments on commit 36688de

Please sign in to comment.