mirror of
https://github.com/octoleo/restic.git
synced 2024-11-28 15:56:37 +00:00
golangci-lint: replace deprecated golint with revive
This commit is contained in:
parent
2f81af6afa
commit
af31266b7d
@ -24,7 +24,7 @@ linters:
|
|||||||
- govet
|
- govet
|
||||||
|
|
||||||
# make sure names and comments are used according to the conventions
|
# make sure names and comments are used according to the conventions
|
||||||
- golint
|
- revive
|
||||||
|
|
||||||
# detect when assignments to existing variables are not used
|
# detect when assignments to existing variables are not used
|
||||||
- ineffassign
|
- ineffassign
|
||||||
@ -51,7 +51,7 @@ issues:
|
|||||||
|
|
||||||
# list of things to not warn about
|
# list of things to not warn about
|
||||||
exclude:
|
exclude:
|
||||||
# golint: do not warn about missing comments for exported stuff
|
# revive: do not warn about missing comments for exported stuff
|
||||||
- exported (function|method|var|type|const) `.*` should have comment or be unexported
|
- exported (function|method|var|type|const) .* should have comment or be unexported
|
||||||
# golint: ignore constants in all caps
|
# revive: ignore constants in all caps
|
||||||
- don't use ALL_CAPS in Go names; use CamelCase
|
- don't use ALL_CAPS in Go names; use CamelCase
|
||||||
|
@ -117,7 +117,7 @@ func (fs *LocalVss) snapshotPath(path string) string {
|
|||||||
fs.msgMessage("creating VSS snapshot for [%s]\n", vssVolume)
|
fs.msgMessage("creating VSS snapshot for [%s]\n", vssVolume)
|
||||||
|
|
||||||
if snapshot, err := NewVssSnapshot(vssVolume, 120, fs.msgError); err != nil {
|
if snapshot, err := NewVssSnapshot(vssVolume, 120, fs.msgError); err != nil {
|
||||||
_ = fs.msgError(vssVolume, errors.Errorf("failed to create snapshot for [%s]: %s\n",
|
_ = fs.msgError(vssVolume, errors.Errorf("failed to create snapshot for [%s]: %s",
|
||||||
vssVolume, err))
|
vssVolume, err))
|
||||||
fs.failedSnapshots[volumeNameLower] = struct{}{}
|
fs.failedSnapshots[volumeNameLower] = struct{}{}
|
||||||
} else {
|
} else {
|
||||||
|
@ -56,7 +56,7 @@ func TestRoundTripperReader(t *testing.T) {
|
|||||||
_, err := io.ReadFull(rand.Reader, data)
|
_, err := io.ReadFull(rand.Reader, data)
|
||||||
test.OK(t, err)
|
test.OK(t, err)
|
||||||
|
|
||||||
var send *tracedReadCloser = newTracedReadCloser(bytes.NewReader(data))
|
send := newTracedReadCloser(bytes.NewReader(data))
|
||||||
var recv *tracedReadCloser
|
var recv *tracedReadCloser
|
||||||
|
|
||||||
rt := limiter.Transport(roundTripper(func(req *http.Request) (*http.Response, error) {
|
rt := limiter.Transport(roundTripper(func(req *http.Request) (*http.Response, error) {
|
||||||
|
@ -166,7 +166,7 @@ func (node *Node) CreateAt(ctx context.Context, path string, repo Repository) er
|
|||||||
case "socket":
|
case "socket":
|
||||||
return nil
|
return nil
|
||||||
default:
|
default:
|
||||||
return errors.Errorf("filetype %q not implemented!\n", node.Type)
|
return errors.Errorf("filetype %q not implemented", node.Type)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -61,7 +61,7 @@ func TestCounter(t *testing.T) {
|
|||||||
|
|
||||||
func TestCounterNil(t *testing.T) {
|
func TestCounterNil(t *testing.T) {
|
||||||
// Shouldn't panic.
|
// Shouldn't panic.
|
||||||
var c *progress.Counter = nil
|
var c *progress.Counter
|
||||||
c.Add(1)
|
c.Add(1)
|
||||||
c.Done()
|
c.Done()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user