Skip to content

Commit cc458ba

Browse files
authored
fix: testifylint and revive lint issues (#884)
1 parent d144ad4 commit cc458ba

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

.golangci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ linters-settings:
3131
deny:
3232
- pkg: "github.com/pkg/errors"
3333
desc: "use stdlib instead"
34+
testifylint:
35+
disable:
36+
- encoded-compare

files/files.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -525,15 +525,15 @@ func addTree(
525525

526526
var ErrContentCollision = fmt.Errorf("content collision")
527527

528-
func contentCollisionError(new *Content, present *Content) error {
528+
func contentCollisionError(newc *Content, present *Content) error {
529529
var presentSource string
530530
if present.Source != "" {
531531
presentSource = " with source " + present.Source
532532
}
533533

534534
return fmt.Errorf("adding %s at destination %s: "+
535535
"%s%s is already present at this destination: %w",
536-
new.Type, new.Destination, present.Type, presentSource, ErrContentCollision,
536+
newc.Type, newc.Destination, present.Type, presentSource, ErrContentCollision,
537537
)
538538
}
539539

rpm/rpm_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -751,12 +751,12 @@ func TestRPMChangelog(t *testing.T) {
751751
notes := strings.Split(allNotes[i], "\n")
752752

753753
require.Equal(t, entry.Date, timestamp)
754-
require.True(t, strings.Contains(title, entry.Packager))
755-
require.True(t, strings.Contains(title, entry.Semver))
754+
require.Contains(t, title, entry.Packager)
755+
require.Contains(t, title, entry.Semver)
756756
require.Equal(t, len(entry.Changes), len(notes))
757757

758758
for j, change := range entry.Changes {
759-
require.True(t, strings.Contains(notes[j], change.Note))
759+
require.Contains(t, notes[j], change.Note)
760760
}
761761
}
762762
}

0 commit comments

Comments
 (0)