Skip to content

Commit d82eb4a

Browse files
author
victor.freches
committed
initial after scaffold
0 parents  commit d82eb4a

33 files changed

+1893
-0
lines changed

.golangci.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
linters:
2+
enable:
3+
- bodyclose
4+
- deadcode
5+
- depguard
6+
- dogsled
7+
- dupl
8+
- errcheck
9+
# - funlen
10+
# - gochecknoglobals
11+
# - gochecknoinits
12+
- goconst
13+
- gocritic
14+
# - gocyclo
15+
# - godox
16+
- gofmt
17+
- goimports
18+
- golint
19+
- gosec
20+
- gosimple
21+
- govet
22+
- ineffassign
23+
- interfacer
24+
- lll
25+
- misspell
26+
# - maligned
27+
- nakedret
28+
- prealloc
29+
- scopelint
30+
- staticcheck
31+
- structcheck
32+
- stylecheck
33+
- typecheck
34+
- unconvert
35+
# - unparam
36+
- unused
37+
- varcheck
38+
# - whitespace
39+
# - wsl
40+
# - gocognit
41+
42+
linters-settings:
43+
govet:
44+
check-shadowing: true
45+
errcheck:
46+
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
47+
# default is false: such cases aren't reported by default.
48+
check-blank: true
49+
golint:
50+
# minimal confidence for issues, default is 0.8
51+
min-confidence: 0
52+
prealloc:
53+
# XXX: we don't recommend using this linter before doing performance profiling.
54+
# For most programs usage of prealloc will be a premature optimization.
55+
56+
# Report preallocation suggestions only on simple loops that have no returns/breaks/continues/gotos in them.
57+
# True by default.
58+
simple: false
59+
range-loops: true # Report preallocation suggestions on range loops, true by default
60+
for-loops: true # Report preallocation suggestions on for loops, false by default

Makefile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
PACKAGES=$(shell go list ./... | grep -v '/simulation')
2+
3+
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
4+
COMMIT := $(shell git log -1 --format='%H')
5+
6+
# TODO: Update the ldflags with the app, client & server names
7+
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=NewApp \
8+
-X github.com/cosmos/cosmos-sdk/version.ServerName=appd \
9+
-X github.com/cosmos/cosmos-sdk/version.ClientName=appcli \
10+
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
11+
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT)
12+
13+
BUILD_FLAGS := -ldflags '$(ldflags)'
14+
15+
all: install
16+
17+
install: go.sum
18+
go install -mod=readonly $(BUILD_FLAGS) ./cmd/appd
19+
go install -mod=readonly $(BUILD_FLAGS) ./cmd/appcli
20+
21+
go.sum: go.mod
22+
@echo "--> Ensure dependencies have not been modified"
23+
GO111MODULE=on go mod verify
24+
25+
# Uncomment when you have some tests
26+
# test:
27+
# @go test -mod=readonly $(PACKAGES)
28+
29+
# look into .golangci.yml for enabling / disabling linters
30+
lint:
31+
@echo "--> Running linter"
32+
@golangci-lint run
33+
@go mod verify

0 commit comments

Comments
 (0)