From 6c9d377bbbb53b3075ccfe8becddf868d31e31bb Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sat, 25 Mar 2023 23:30:15 +0100 Subject: [PATCH] vfs: ignore false positive from the unused linter --- vfs/dir.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vfs/dir.go b/vfs/dir.go index 2087dc638..c466c4b5d 100644 --- a/vfs/dir.go +++ b/vfs/dir.go @@ -75,6 +75,9 @@ func (d *Dir) String() string { } // Dumps the directory tree to the string builder with the given indent +// +//lint:ignore U1000 false positive when running staticcheck, +//nolint:unused // Don't include unused when running golangci-lint func (d *Dir) dumpIndent(out *strings.Builder, indent string) { if d == nil { fmt.Fprintf(out, "%s\n", indent) @@ -109,6 +112,9 @@ func (d *Dir) dumpIndent(out *strings.Builder, indent string) { } // Dumps a nicely formatted directory tree to a string +// +//lint:ignore U1000 false positive when running staticcheck, +//nolint:unused // Don't include unused when running golangci-lint func (d *Dir) dump() string { var out strings.Builder d.dumpIndent(&out, "")