mirror of
https://github.com/anchore/syft.git
synced 2026-10-31 14:36:33 +01:00
fix: keep RealPath as top-level, use FullPath and utility functions FullNestedPath, LocalPath, Path
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ func resourceCleanup(m dsl.Matcher) {
|
||||
m["res"].Type.Implements(`io.Reader`) &&
|
||||
m["err"].Type.Implements(`error`) &&
|
||||
!m["next"].Text.Matches(`defer internal.CloseAndLogError`)).
|
||||
Report(`please call "defer internal.CloseAndLogError($res, $loc.RealPath)" right after checking the error returned from $resolver.FileContentsByLocation.`)
|
||||
Report(`please call "defer internal.CloseAndLogError($res, $loc.FullNestedPath())" right after checking the error returned from $resolver.FileContentsByLocation.`)
|
||||
}
|
||||
|
||||
// nolint:unused
|
||||
|
||||
Reference in New Issue
Block a user