Remove complex coverage tests
This commit is contained in:
parent
a0b7eb9c6d
commit
9ef98a6a00
28 changed files with 0 additions and 536 deletions
|
@ -1,80 +0,0 @@
|
||||||
# options for analysis running
|
|
||||||
run:
|
|
||||||
# default concurrency is a available CPU number
|
|
||||||
concurrency: 8
|
|
||||||
|
|
||||||
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
|
||||||
deadline: 5m
|
|
||||||
|
|
||||||
# exit code when at least one issue was found, default is 1
|
|
||||||
issues-exit-code: 1
|
|
||||||
|
|
||||||
# include test files or not, default is true
|
|
||||||
tests: true
|
|
||||||
|
|
||||||
|
|
||||||
# output configuration options
|
|
||||||
output:
|
|
||||||
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
|
|
||||||
format: colored-line-number
|
|
||||||
|
|
||||||
# print lines of code with issue, default is true
|
|
||||||
print-issued-lines: true
|
|
||||||
|
|
||||||
# print linter name in the end of issue text, default is true
|
|
||||||
print-linter-name: true
|
|
||||||
|
|
||||||
|
|
||||||
# all available settings of specific linters
|
|
||||||
linters-settings:
|
|
||||||
govet:
|
|
||||||
# report about shadowed variables
|
|
||||||
check-shadowing: true
|
|
||||||
golint:
|
|
||||||
# minimal confidence for issues, default is 0.8
|
|
||||||
min-confidence: 0.8
|
|
||||||
gofmt:
|
|
||||||
# simplify code: gofmt with `-s` option, true by default
|
|
||||||
simplify: true
|
|
||||||
goimports:
|
|
||||||
# put imports beginning with prefix after 3rd-party packages;
|
|
||||||
# it's a comma-separated list of prefixes
|
|
||||||
local-prefixes: gitlab.com
|
|
||||||
stylecheck:
|
|
||||||
# https://staticcheck.io/docs/options#checks
|
|
||||||
checks: ["all", "-ST1018"]
|
|
||||||
|
|
||||||
linters:
|
|
||||||
disable-all: true
|
|
||||||
enable:
|
|
||||||
- errcheck
|
|
||||||
- gofmt
|
|
||||||
- stylecheck
|
|
||||||
- gosimple
|
|
||||||
- govet
|
|
||||||
- ineffassign
|
|
||||||
- exportloopref
|
|
||||||
- staticcheck
|
|
||||||
- typecheck
|
|
||||||
- unconvert
|
|
||||||
|
|
||||||
|
|
||||||
issues:
|
|
||||||
# List of regexps of issue texts to exclude, empty list by default.
|
|
||||||
# But independently from this option we use default exclude patterns,
|
|
||||||
# it can be disabled by `exclude-use-default: false`. To list all
|
|
||||||
# excluded by default patterns execute `golangci-lint run --help`
|
|
||||||
exclude:
|
|
||||||
- Using the variable on range scope .* in function literal
|
|
||||||
|
|
||||||
# Independently from option `exclude` we use default exclude patterns,
|
|
||||||
# it can be disabled by this option. To list all
|
|
||||||
# excluded by default patterns execute `golangci-lint run --help`.
|
|
||||||
# Default value for this option is true.
|
|
||||||
exclude-use-default: true
|
|
||||||
|
|
||||||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
|
|
||||||
max-per-linter: 0
|
|
||||||
|
|
||||||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
|
||||||
max-same-issues: 0
|
|
|
@ -1,6 +0,0 @@
|
||||||
//go:build !change
|
|
||||||
// +build !change
|
|
||||||
|
|
||||||
package extracoverage
|
|
||||||
|
|
||||||
// min coverage: . 70%
|
|
|
@ -1,11 +0,0 @@
|
||||||
//go:build !change
|
|
||||||
// +build !change
|
|
||||||
|
|
||||||
package extracoverage
|
|
||||||
|
|
||||||
func Sum(a, b int64) int64 {
|
|
||||||
if a == 0 {
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
return a + b
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
//go:build solution
|
|
||||||
// +build solution
|
|
||||||
|
|
||||||
package extracoverage
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestSum(t *testing.T) {
|
|
||||||
require.Equal(t, int64(2), Sum(1, 1))
|
|
||||||
require.Equal(t, int64(1), Sum(0, 1))
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
module gitlab.com/slon/shad-go
|
|
||||||
|
|
||||||
go 1.16
|
|
||||||
|
|
||||||
require github.com/stretchr/testify v1.5.1
|
|
|
@ -1,11 +0,0 @@
|
||||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
|
|
||||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
|
@ -1,80 +0,0 @@
|
||||||
# options for analysis running
|
|
||||||
run:
|
|
||||||
# default concurrency is a available CPU number
|
|
||||||
concurrency: 8
|
|
||||||
|
|
||||||
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
|
||||||
deadline: 5m
|
|
||||||
|
|
||||||
# exit code when at least one issue was found, default is 1
|
|
||||||
issues-exit-code: 1
|
|
||||||
|
|
||||||
# include test files or not, default is true
|
|
||||||
tests: true
|
|
||||||
|
|
||||||
|
|
||||||
# output configuration options
|
|
||||||
output:
|
|
||||||
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
|
|
||||||
format: colored-line-number
|
|
||||||
|
|
||||||
# print lines of code with issue, default is true
|
|
||||||
print-issued-lines: true
|
|
||||||
|
|
||||||
# print linter name in the end of issue text, default is true
|
|
||||||
print-linter-name: true
|
|
||||||
|
|
||||||
|
|
||||||
# all available settings of specific linters
|
|
||||||
linters-settings:
|
|
||||||
govet:
|
|
||||||
# report about shadowed variables
|
|
||||||
check-shadowing: true
|
|
||||||
golint:
|
|
||||||
# minimal confidence for issues, default is 0.8
|
|
||||||
min-confidence: 0.8
|
|
||||||
gofmt:
|
|
||||||
# simplify code: gofmt with `-s` option, true by default
|
|
||||||
simplify: true
|
|
||||||
goimports:
|
|
||||||
# put imports beginning with prefix after 3rd-party packages;
|
|
||||||
# it's a comma-separated list of prefixes
|
|
||||||
local-prefixes: gitlab.com
|
|
||||||
stylecheck:
|
|
||||||
# https://staticcheck.io/docs/options#checks
|
|
||||||
checks: ["all", "-ST1018"]
|
|
||||||
|
|
||||||
linters:
|
|
||||||
disable-all: true
|
|
||||||
enable:
|
|
||||||
- errcheck
|
|
||||||
- gofmt
|
|
||||||
- stylecheck
|
|
||||||
- gosimple
|
|
||||||
- govet
|
|
||||||
- ineffassign
|
|
||||||
- exportloopref
|
|
||||||
- staticcheck
|
|
||||||
- typecheck
|
|
||||||
- unconvert
|
|
||||||
|
|
||||||
|
|
||||||
issues:
|
|
||||||
# List of regexps of issue texts to exclude, empty list by default.
|
|
||||||
# But independently from this option we use default exclude patterns,
|
|
||||||
# it can be disabled by `exclude-use-default: false`. To list all
|
|
||||||
# excluded by default patterns execute `golangci-lint run --help`
|
|
||||||
exclude:
|
|
||||||
- Using the variable on range scope .* in function literal
|
|
||||||
|
|
||||||
# Independently from option `exclude` we use default exclude patterns,
|
|
||||||
# it can be disabled by this option. To list all
|
|
||||||
# excluded by default patterns execute `golangci-lint run --help`.
|
|
||||||
# Default value for this option is true.
|
|
||||||
exclude-use-default: true
|
|
||||||
|
|
||||||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
|
|
||||||
max-per-linter: 0
|
|
||||||
|
|
||||||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
|
||||||
max-same-issues: 0
|
|
|
@ -1,13 +0,0 @@
|
||||||
package extracoverage
|
|
||||||
|
|
||||||
func LongFunc() int {
|
|
||||||
x := 0
|
|
||||||
x++
|
|
||||||
x++
|
|
||||||
x++
|
|
||||||
x++
|
|
||||||
x++
|
|
||||||
x++
|
|
||||||
x++
|
|
||||||
return x
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
package extracoverage
|
|
||||||
|
|
||||||
import "testing"
|
|
||||||
|
|
||||||
// Gives package coverage 75%
|
|
||||||
func TestLongFunc(t *testing.T) {
|
|
||||||
if got, want := LongFunc(), 7; got != want {
|
|
||||||
t.Errorf("LongFunc() = %d; want %d", got, want)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
//go:build !change
|
|
||||||
// +build !change
|
|
||||||
|
|
||||||
package extracoverage
|
|
||||||
|
|
||||||
// min coverage: . 70%
|
|
|
@ -1,11 +0,0 @@
|
||||||
//go:build !change
|
|
||||||
// +build !change
|
|
||||||
|
|
||||||
package extracoverage
|
|
||||||
|
|
||||||
func Sum(a, b int64) int64 {
|
|
||||||
if a == 0 {
|
|
||||||
return b
|
|
||||||
}
|
|
||||||
return a + b
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
module gitlab.com/slon/shad-go
|
|
||||||
|
|
||||||
go 1.16
|
|
||||||
|
|
||||||
require github.com/stretchr/testify v1.5.1
|
|
|
@ -1,11 +0,0 @@
|
||||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
|
|
||||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
|
@ -1,80 +0,0 @@
|
||||||
# options for analysis running
|
|
||||||
run:
|
|
||||||
# default concurrency is a available CPU number
|
|
||||||
concurrency: 8
|
|
||||||
|
|
||||||
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
|
||||||
deadline: 5m
|
|
||||||
|
|
||||||
# exit code when at least one issue was found, default is 1
|
|
||||||
issues-exit-code: 1
|
|
||||||
|
|
||||||
# include test files or not, default is true
|
|
||||||
tests: true
|
|
||||||
|
|
||||||
|
|
||||||
# output configuration options
|
|
||||||
output:
|
|
||||||
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
|
|
||||||
format: colored-line-number
|
|
||||||
|
|
||||||
# print lines of code with issue, default is true
|
|
||||||
print-issued-lines: true
|
|
||||||
|
|
||||||
# print linter name in the end of issue text, default is true
|
|
||||||
print-linter-name: true
|
|
||||||
|
|
||||||
|
|
||||||
# all available settings of specific linters
|
|
||||||
linters-settings:
|
|
||||||
govet:
|
|
||||||
# report about shadowed variables
|
|
||||||
check-shadowing: true
|
|
||||||
golint:
|
|
||||||
# minimal confidence for issues, default is 0.8
|
|
||||||
min-confidence: 0.8
|
|
||||||
gofmt:
|
|
||||||
# simplify code: gofmt with `-s` option, true by default
|
|
||||||
simplify: true
|
|
||||||
goimports:
|
|
||||||
# put imports beginning with prefix after 3rd-party packages;
|
|
||||||
# it's a comma-separated list of prefixes
|
|
||||||
local-prefixes: gitlab.com
|
|
||||||
stylecheck:
|
|
||||||
# https://staticcheck.io/docs/options#checks
|
|
||||||
checks: ["all", "-ST1018"]
|
|
||||||
|
|
||||||
linters:
|
|
||||||
disable-all: true
|
|
||||||
enable:
|
|
||||||
- errcheck
|
|
||||||
- gofmt
|
|
||||||
- stylecheck
|
|
||||||
- gosimple
|
|
||||||
- govet
|
|
||||||
- ineffassign
|
|
||||||
- exportloopref
|
|
||||||
- staticcheck
|
|
||||||
- typecheck
|
|
||||||
- unconvert
|
|
||||||
|
|
||||||
|
|
||||||
issues:
|
|
||||||
# List of regexps of issue texts to exclude, empty list by default.
|
|
||||||
# But independently from this option we use default exclude patterns,
|
|
||||||
# it can be disabled by `exclude-use-default: false`. To list all
|
|
||||||
# excluded by default patterns execute `golangci-lint run --help`
|
|
||||||
exclude:
|
|
||||||
- Using the variable on range scope .* in function literal
|
|
||||||
|
|
||||||
# Independently from option `exclude` we use default exclude patterns,
|
|
||||||
# it can be disabled by this option. To list all
|
|
||||||
# excluded by default patterns execute `golangci-lint run --help`.
|
|
||||||
# Default value for this option is true.
|
|
||||||
exclude-use-default: true
|
|
||||||
|
|
||||||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
|
|
||||||
max-per-linter: 0
|
|
||||||
|
|
||||||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
|
||||||
max-same-issues: 0
|
|
|
@ -1,5 +0,0 @@
|
||||||
module gitlab.com/slon/shad-go
|
|
||||||
|
|
||||||
go 1.16
|
|
||||||
|
|
||||||
require github.com/stretchr/testify v1.5.1
|
|
|
@ -1,11 +0,0 @@
|
||||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
|
|
||||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
|
@ -1,6 +0,0 @@
|
||||||
//go:build !change
|
|
||||||
// +build !change
|
|
||||||
|
|
||||||
package skippedcoverpkg
|
|
||||||
|
|
||||||
// min coverage: sum,product 70%
|
|
|
@ -1,8 +0,0 @@
|
||||||
//go:build !change
|
|
||||||
// +build !change
|
|
||||||
|
|
||||||
package product
|
|
||||||
|
|
||||||
func Product(x, y int) int {
|
|
||||||
return x * y
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
//go:build solution
|
|
||||||
// +build solution
|
|
||||||
|
|
||||||
package product
|
|
||||||
|
|
||||||
import "testing"
|
|
||||||
|
|
||||||
func TestProduct(t *testing.T) {
|
|
||||||
x, y := 3, 3
|
|
||||||
if got, want := Product(x, y), 9; got != want {
|
|
||||||
t.Errorf("Product(%d, %d) = %d; want %d", x, y, got, want)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
//go:build solution
|
|
||||||
// +build solution
|
|
||||||
|
|
||||||
package sum
|
|
||||||
|
|
||||||
import "testing"
|
|
||||||
|
|
||||||
func TestSum(t *testing.T) {
|
|
||||||
x, y := 1, 1
|
|
||||||
if got, want := Sum(x, y), 2; got != want {
|
|
||||||
t.Errorf("Sum(%d, %d) = %d; want %d", x, y, got, want)
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
//go:build !change
|
|
||||||
// +build !change
|
|
||||||
|
|
||||||
package sum
|
|
||||||
|
|
||||||
func Sum(x, y int) int {
|
|
||||||
return x + y
|
|
||||||
}
|
|
|
@ -1,80 +0,0 @@
|
||||||
# options for analysis running
|
|
||||||
run:
|
|
||||||
# default concurrency is a available CPU number
|
|
||||||
concurrency: 8
|
|
||||||
|
|
||||||
# timeout for analysis, e.g. 30s, 5m, default is 1m
|
|
||||||
deadline: 5m
|
|
||||||
|
|
||||||
# exit code when at least one issue was found, default is 1
|
|
||||||
issues-exit-code: 1
|
|
||||||
|
|
||||||
# include test files or not, default is true
|
|
||||||
tests: true
|
|
||||||
|
|
||||||
|
|
||||||
# output configuration options
|
|
||||||
output:
|
|
||||||
# colored-line-number|line-number|json|tab|checkstyle, default is "colored-line-number"
|
|
||||||
format: colored-line-number
|
|
||||||
|
|
||||||
# print lines of code with issue, default is true
|
|
||||||
print-issued-lines: true
|
|
||||||
|
|
||||||
# print linter name in the end of issue text, default is true
|
|
||||||
print-linter-name: true
|
|
||||||
|
|
||||||
|
|
||||||
# all available settings of specific linters
|
|
||||||
linters-settings:
|
|
||||||
govet:
|
|
||||||
# report about shadowed variables
|
|
||||||
check-shadowing: true
|
|
||||||
golint:
|
|
||||||
# minimal confidence for issues, default is 0.8
|
|
||||||
min-confidence: 0.8
|
|
||||||
gofmt:
|
|
||||||
# simplify code: gofmt with `-s` option, true by default
|
|
||||||
simplify: true
|
|
||||||
goimports:
|
|
||||||
# put imports beginning with prefix after 3rd-party packages;
|
|
||||||
# it's a comma-separated list of prefixes
|
|
||||||
local-prefixes: gitlab.com
|
|
||||||
stylecheck:
|
|
||||||
# https://staticcheck.io/docs/options#checks
|
|
||||||
checks: ["all", "-ST1018"]
|
|
||||||
|
|
||||||
linters:
|
|
||||||
disable-all: true
|
|
||||||
enable:
|
|
||||||
- errcheck
|
|
||||||
- gofmt
|
|
||||||
- stylecheck
|
|
||||||
- gosimple
|
|
||||||
- govet
|
|
||||||
- ineffassign
|
|
||||||
- exportloopref
|
|
||||||
- staticcheck
|
|
||||||
- typecheck
|
|
||||||
- unconvert
|
|
||||||
|
|
||||||
|
|
||||||
issues:
|
|
||||||
# List of regexps of issue texts to exclude, empty list by default.
|
|
||||||
# But independently from this option we use default exclude patterns,
|
|
||||||
# it can be disabled by `exclude-use-default: false`. To list all
|
|
||||||
# excluded by default patterns execute `golangci-lint run --help`
|
|
||||||
exclude:
|
|
||||||
- Using the variable on range scope .* in function literal
|
|
||||||
|
|
||||||
# Independently from option `exclude` we use default exclude patterns,
|
|
||||||
# it can be disabled by this option. To list all
|
|
||||||
# excluded by default patterns execute `golangci-lint run --help`.
|
|
||||||
# Default value for this option is true.
|
|
||||||
exclude-use-default: true
|
|
||||||
|
|
||||||
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
|
|
||||||
max-per-linter: 0
|
|
||||||
|
|
||||||
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
|
|
||||||
max-same-issues: 0
|
|
|
@ -1,5 +0,0 @@
|
||||||
module gitlab.com/slon/shad-go
|
|
||||||
|
|
||||||
go 1.16
|
|
||||||
|
|
||||||
require github.com/stretchr/testify v1.5.1
|
|
|
@ -1,11 +0,0 @@
|
||||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4=
|
|
||||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
|
@ -1,6 +0,0 @@
|
||||||
//go:build !change
|
|
||||||
// +build !change
|
|
||||||
|
|
||||||
package skippedcoverpkg
|
|
||||||
|
|
||||||
// min coverage: add product 70%
|
|
|
@ -1,8 +0,0 @@
|
||||||
//go:build !change
|
|
||||||
// +build !change
|
|
||||||
|
|
||||||
package product
|
|
||||||
|
|
||||||
func Product(x, y int) int {
|
|
||||||
return x * y
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
//go:build !change
|
|
||||||
// +build !change
|
|
||||||
|
|
||||||
package sum
|
|
||||||
|
|
||||||
func Sum(x, y int) int {
|
|
||||||
return x + y
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
package sum
|
|
||||||
|
|
||||||
import "testing"
|
|
||||||
|
|
||||||
func TestSum(t *testing.T) {
|
|
||||||
x, y := 1, 1
|
|
||||||
if got, want := Sum(x, y), 2; got != want {
|
|
||||||
t.Errorf("Sum(%d, %d) = %d; want %d", x, y, got, want)
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in a new issue