From db54166991304220303ee1de8e06292c4c0a4e3c Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 1 Jan 2023 17:41:03 -0700 Subject: lint: Turn on containedctx --- .golangci.yml | 1 - lib/btrfsprogs/btrfsutil/broken_btree.go | 4 ++-- lib/textui/progress.go | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d9ba0f6..bf04a40 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -24,7 +24,6 @@ linters: # These are disabled not because I think they're bad, but because # they currently don't pass, and I haven't evaluated them yet. - - containedctx - cyclop - dogsled - dupword diff --git a/lib/btrfsprogs/btrfsutil/broken_btree.go b/lib/btrfsprogs/btrfsutil/broken_btree.go index 28e8b1d..cb7aa55 100644 --- a/lib/btrfsprogs/btrfsutil/broken_btree.go +++ b/lib/btrfsprogs/btrfsutil/broken_btree.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker +// Copyright (C) 2022-2023 Luke Shumaker // // SPDX-License-Identifier: GPL-2.0-or-later @@ -57,7 +57,7 @@ func newTreeIndex(arena *SkinnyPathArena) treeIndex { } type brokenTrees struct { - ctx context.Context + ctx context.Context //nolint:containedctx // don't have an option while keeping the same API inner *btrfs.FS arena *SkinnyPathArena diff --git a/lib/textui/progress.go b/lib/textui/progress.go index 7b3f63a..56fda96 100644 --- a/lib/textui/progress.go +++ b/lib/textui/progress.go @@ -1,4 +1,4 @@ -// Copyright (C) 2022 Luke Shumaker +// Copyright (C) 2022-2023 Luke Shumaker // // SPDX-License-Identifier: GPL-2.0-or-later @@ -19,7 +19,7 @@ type Stats interface { } type Progress[T Stats] struct { - ctx context.Context + ctx context.Context //nolint:containedctx // captured for separate goroutine lvl dlog.LogLevel interval time.Duration -- cgit v1.2.3-2-g168b