Skip to content

Commit

Permalink
Improve golangci linter
Browse files Browse the repository at this point in the history
  • Loading branch information
msdundar committed Aug 2, 2021
1 parent 545c2bf commit 41ab70d
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 4 deletions.
39 changes: 39 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
run:
tests: false

issues:
include:
- EXC0005
- EXC0011
- EXC0012
- EXC0013

max-issues-per-linter: 0
max-same-issues: 0

linters:
enable:
- asciicheck
- bodyclose
- cyclop
- depguard
- dogsled
- dupl
- errorlint
- exhaustive
- exportloopref
- goconst
- godot
- godox
- goimports
- goprintffuncname
- gosec
- ifshort
- misspell
- prealloc
- revive
- rowserrcheck
- sqlclosecheck
- unconvert
- unparam
- whitespace
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.5] - 2021-08-02

Updated aws-sdk-go.
Added advanced golangci configs and fixed linter issues.

## [1.1.4] - 2021-07-29

Updated aws-sdk-go.

## [1.1.3] - 2021-07-24

Updated aws-sdk-go.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on CI, depending on your needs.
## Install

```sh
go get github.com/msdundar/[email protected].3
go get github.com/msdundar/[email protected].5
```

> `kanarya` uses Go Modules to manage dependencies, and supports Go versions
Expand Down
2 changes: 0 additions & 2 deletions lambda_gradual_rollout.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func GradualRollOut(
sleep time.Duration,
payload []byte,
) (string, error) {

for rate := traffic; rate <= 1.0; rate += traffic {
sRate := math.Round(rate*100) / 100

Expand Down Expand Up @@ -68,5 +67,4 @@ func GradualRollOut(
}

return "", nil

}
2 changes: 1 addition & 1 deletion s3_uploader.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func UploadToS3(client *s3.S3, lambdaPackage LambdaPackage) (S3UploadResponse, e
defer file.Close()

fileInfo, _ := file.Stat()
var size int64 = fileInfo.Size()
var size = fileInfo.Size()
buffer := make([]byte, size)
_, err = file.Read(buffer)

Expand Down

0 comments on commit 41ab70d

Please sign in to comment.