-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
chore: use ruleguard to test for missing defer statements #2837
Conversation
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
We see that this branch has the expected failures: https://github.com/anchore/syft/actions/runs/8930279182/job/24530010619?pr=2837#step:4:50
Taking a look at syft/syft/linux/identify_release.go Lines 66 to 90 in 9eb8c62
|
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
Signed-off-by: Will Murphy <will.murphy@anchore.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
slick!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved - Small comment on moving a wrap
directive to string
for an error value =)
@@ -265,8 +265,9 @@ func fetchCopyrightContents(resolver file.Resolver, dbLocation file.Location, m | |||
|
|||
reader, err := resolver.FileContentsByLocation(*location) | |||
if err != nil { | |||
log.Warnf("failed to fetch deb copyright contents (package=%s): %w", m.Package, err) | |||
log.Warnf("failed to fetch deb copyright contents (package=%s): %s", m.Package, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we changing the error from %w
to %s
here?
See #2826
Supersedes #2836.
The only hang-up I've seen is that calls to
make lint
can run an old version of the rules unless./.tool/golangci-lint cache clean
is called first, which could be annoying when PRing future rule changes.