Skip to content

Commit

Permalink
fix: testifylint and revive lint issues (#884)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored Nov 19, 2024
1 parent d144ad4 commit cc458ba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ linters-settings:
deny:
- pkg: "github.com/pkg/errors"
desc: "use stdlib instead"
testifylint:
disable:
- encoded-compare
4 changes: 2 additions & 2 deletions files/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -525,15 +525,15 @@ func addTree(

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

func contentCollisionError(new *Content, present *Content) error {
func contentCollisionError(newc *Content, present *Content) error {
var presentSource string
if present.Source != "" {
presentSource = " with source " + present.Source
}

return fmt.Errorf("adding %s at destination %s: "+
"%s%s is already present at this destination: %w",
new.Type, new.Destination, present.Type, presentSource, ErrContentCollision,
newc.Type, newc.Destination, present.Type, presentSource, ErrContentCollision,
)
}

Expand Down
6 changes: 3 additions & 3 deletions rpm/rpm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -751,12 +751,12 @@ func TestRPMChangelog(t *testing.T) {
notes := strings.Split(allNotes[i], "\n")

require.Equal(t, entry.Date, timestamp)
require.True(t, strings.Contains(title, entry.Packager))
require.True(t, strings.Contains(title, entry.Semver))
require.Contains(t, title, entry.Packager)
require.Contains(t, title, entry.Semver)
require.Equal(t, len(entry.Changes), len(notes))

for j, change := range entry.Changes {
require.True(t, strings.Contains(notes[j], change.Note))
require.Contains(t, notes[j], change.Note)
}
}
}
Expand Down

0 comments on commit cc458ba

Please sign in to comment.