Skip to content

Commit

Permalink
ci: fix golangci-lint errors (#496)
Browse files Browse the repository at this point in the history
Fix golangci-lint errors triggered by new version.

Disable deprecated linters.
  • Loading branch information
stevenh authored May 19, 2023
1 parent 2b00d85 commit fbcfda9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,16 @@ linters:
- exhaustruct
- nosnakecase
- dupword
- structcheck
- deadcode
- golint
- varcheck
- ifshort
- interfacer
- maligned

issues:
exclude-use-default: false
max-same-issues: 0
exclude:
- Deferring unsafe method "Close" on type "io\.ReadCloser"
2 changes: 1 addition & 1 deletion tools/gen-jscore/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ type jsType struct {
Class string `yaml:"class"`
Value string `yaml:"value"`
Properties []property `yaml:"properties"`
Prototype *prototype
Prototype *prototype `yaml:"prototype"`
}

// BlankConstructor is a default fallback returning false for templates.
Expand Down
4 changes: 2 additions & 2 deletions value_number.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ func parseNumber(value string) float64 {
return 0
}

parseFloat := false
var parseFloat bool
switch {
case strings.IndexRune(value, '.') != -1: //nolint: gosimple
case strings.ContainsRune(value, '.'):
parseFloat = true
case stringToNumberParseInteger.MatchString(value):
parseFloat = false
Expand Down

0 comments on commit fbcfda9

Please sign in to comment.