Skip to content

Commit

Permalink
Added comments, logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mrz1836 committed Oct 3, 2020
1 parent a4936d6 commit 65cd03b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ git:
notifications:
email: false

# Install before running scripts
# Install linter before running scripts
before_script:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | bash -s -- -b $GOPATH/bin v1.31.0

# Run all scripts
script:
- make test-travis
# - $GOPATH/bin/golangci-lint run

# After build success
after_success:
Expand Down
20 changes: 10 additions & 10 deletions CODE_STANDARDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,22 @@ This project uses the following code standards and specifications from:
- [godoc](https://godoc.org/golang.org/x/tools/cmd/godoc)
- [gofmt](https://golang.org/cmd/gofmt/)
- [golangci-lint](https://golangci-lint.run/usage/quick-start/)
- [golint](https://github.com/golang/lint)
- [golint](https://github.com/golang/lint) (deprecated)
- [report card](https://goreportcard.com/)
- [vet](https://golang.org/cmd/vet/)

### *effective go* standards
View the [effective go](https://golang.org/doc/effective_go.html) standards documentation.

### *golint* specifications
### *golangci-lint* specifications
The package [golangci-lint](https://golangci-lint.run/usage/quick-start) runs several linters in one package/cmd.

How to install [golangci-lint](https://golangci-lint.run/):
```shell script
brew install golangci-lint
```

### *golint* specifications (deprecated)
The package [golint](https://github.com/golang/lint) differs from [gofmt](https://golang.org/cmd/gofmt/). The package [gofmt](https://golang.org/cmd/gofmt/) formats Go source code, whereas [golint](https://github.com/golang/lint) prints out style mistakes. The package [golint](https://github.com/golang/lint) differs from [vet](https://golang.org/cmd/vet/). The package [vet](https://golang.org/cmd/vet/) is concerned with correctness, whereas [golint](https://github.com/golang/lint) is concerned with coding style. The package [golint](https://github.com/golang/lint) is in use at Google, and it seeks to match the accepted style of the open source [Go project](https://golang.org/).

How to install [golint](https://github.com/golang/lint):
Expand All @@ -25,14 +33,6 @@ cd ../go-bitcoin
golint
```

### *golangci-lint* specifications
The package [golangci-lint](https://golangci-lint.run/usage/quick-start) runs several linters in one package/cmd.

How to install [golangci-lint](https://golangci-lint.run/):
```shell script
brew install golangci-lint
```

### *go vet* specifications
[Vet](https://golang.org/cmd/vet/) examines Go source code and reports suspicious constructs. [Vet](https://golang.org/cmd/vet/) uses heuristics that do not guarantee all reports are genuine problems, but it can find errors not caught by the compilers.

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ clean: ## Remove previous builds and any test cache data
@if [ -d $(DISTRIBUTIONS_DIR) ]; then rm -r $(DISTRIBUTIONS_DIR); fi

lint:: ## Runs the golangci-lint tool
@echo "running golangci-lint..."
@golangci-lint run

release:: ## Runs common.release then runs godocs
Expand Down

0 comments on commit 65cd03b

Please sign in to comment.