From 5e367588152facd31ddd6b841a42bf05adb57315 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 8 Jul 2022 18:42:28 -0600 Subject: Add a Makefile that runs lint and stuff --- pkg/btrfs/btrfsitem/item_dir.go | 2 +- pkg/btrfs/btrfsvol/lvm.go | 2 +- pkg/btrfs/io4_fs.go | 1 - pkg/linux/stat.go | 3 +++ pkg/rbtree/rbtree_util.go | 4 ++-- 5 files changed, 7 insertions(+), 5 deletions(-) (limited to 'pkg') diff --git a/pkg/btrfs/btrfsitem/item_dir.go b/pkg/btrfs/btrfsitem/item_dir.go index 4467d83..2c4c75b 100644 --- a/pkg/btrfs/btrfsitem/item_dir.go +++ b/pkg/btrfs/btrfsitem/item_dir.go @@ -93,7 +93,7 @@ const ( FT_SYMLINK = FileType(7) FT_XATTR = FileType(8) - FT_MAX = FileType(9) + FT_MAX = FileType(9) ) func (ft FileType) String() string { diff --git a/pkg/btrfs/btrfsvol/lvm.go b/pkg/btrfs/btrfsvol/lvm.go index 2857762..c05b9dd 100644 --- a/pkg/btrfs/btrfsvol/lvm.go +++ b/pkg/btrfs/btrfsvol/lvm.go @@ -212,7 +212,7 @@ func (lv *LogicalVolume[PhysicalVolume]) fsck() error { func (lv *LogicalVolume[PhysicalVolume]) Mappings() []Mapping { var ret []Mapping - lv.logical2physical.Walk(func(node *rbtree.Node[chunkMapping]) error { + _ = lv.logical2physical.Walk(func(node *rbtree.Node[chunkMapping]) error { chunk := node.Value var flags *BlockGroupFlags if chunk.Flags != nil { diff --git a/pkg/btrfs/io4_fs.go b/pkg/btrfs/io4_fs.go index cd8e281..18ae42a 100644 --- a/pkg/btrfs/io4_fs.go +++ b/pkg/btrfs/io4_fs.go @@ -260,7 +260,6 @@ func (ret *Dir) populate() { nextIndex++ } } - return } func (dir *Dir) AbsPath() (string, error) { diff --git a/pkg/linux/stat.go b/pkg/linux/stat.go index 15e18a9..c4d4ad9 100644 --- a/pkg/linux/stat.go +++ b/pkg/linux/stat.go @@ -1,7 +1,10 @@ +// Based on https://github.com/datawire/ocibuild/blob/master/pkg/python/stat.go + package linux type StatMode uint32 +//nolint:deadcode,varcheck // not all of these modes will be used const ( // 16 bits = 5⅓ octal characters diff --git a/pkg/rbtree/rbtree_util.go b/pkg/rbtree/rbtree_util.go index db7fd32..2e7a48d 100644 --- a/pkg/rbtree/rbtree_util.go +++ b/pkg/rbtree/rbtree_util.go @@ -33,13 +33,13 @@ func (t *Tree[K, V]) Equal(u *Tree[K, V]) bool { } var tSlice []V - t.Walk(func(node *Node[V]) error { + _ = t.Walk(func(node *Node[V]) error { tSlice = append(tSlice, node.Value) return nil }) var uSlice []V - u.Walk(func(node *Node[V]) error { + _ = u.Walk(func(node *Node[V]) error { uSlice = append(uSlice, node.Value) return nil }) -- cgit v1.2.3-2-g168b