mirror of
https://github.com/restic/restic.git
synced 2025-12-12 05:52:24 +00:00
extra linters
This commit is contained in:
@@ -118,7 +118,7 @@ func TestRoundTripperReader(t *testing.T) {
|
||||
test.Assert(t, bytes.Equal(data, out.Bytes()), "data ping-pong failed")
|
||||
}
|
||||
|
||||
// nolint:bodyclose // the http response is just a mock
|
||||
//nolint:bodyclose // the http response is just a mock
|
||||
func TestRoundTripperCornerCases(t *testing.T) {
|
||||
limiter := NewStaticLimiter(Limits{42 * 1024, 42 * 1024})
|
||||
|
||||
|
||||
@@ -176,7 +176,6 @@ func (r *SFTP) mkdirAllDataSubdirs(ctx context.Context, nconn uint) error {
|
||||
g.SetLimit(int(nconn))
|
||||
|
||||
for _, d := range r.Paths() {
|
||||
d := d
|
||||
g.Go(func() error {
|
||||
// First try Mkdir. For most directories in Paths, this takes one
|
||||
// round trip, not counting duplicate parent creations causes by
|
||||
|
||||
@@ -669,7 +669,6 @@ func benchmarkSnapshotScaling(t *testing.B, newSnapshots int) {
|
||||
func BenchmarkCheckerSnapshotScaling(b *testing.B) {
|
||||
counts := []int{50, 100, 200}
|
||||
for _, count := range counts {
|
||||
count := count
|
||||
b.Run(strconv.Itoa(count), func(b *testing.B) {
|
||||
benchmarkSnapshotScaling(b, count)
|
||||
})
|
||||
|
||||
@@ -25,7 +25,7 @@ type ExtendedFileInfo struct {
|
||||
ModTime time.Time // last (content) modification time stamp
|
||||
ChangeTime time.Time // last status change time stamp
|
||||
|
||||
// nolint:unused // only used on Windows
|
||||
//nolint:unused // only used on Windows
|
||||
sys any // Value returned by os.FileInfo.Sys()
|
||||
}
|
||||
|
||||
|
||||
@@ -413,7 +413,6 @@ func handleUnknownGenericAttributeFound(genericAttributeType GenericAttributeTyp
|
||||
|
||||
// HandleAllUnknownGenericAttributesFound performs validations for all generic attributes of a node.
|
||||
// This is not used on windows currently because windows has handling for generic attributes.
|
||||
// nolint:unused
|
||||
func HandleAllUnknownGenericAttributesFound(attributes map[GenericAttributeType]json.RawMessage, warn func(msg string)) error {
|
||||
for name := range attributes {
|
||||
handleUnknownGenericAttributeFound(name, warn)
|
||||
|
||||
Reference in New Issue
Block a user