Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,3 @@ However, the slowg checker does not prevent the use of With and WithGroup.
wlog := log.With("key", val) // this is fine
wlog.Info("info") // this is also fine
wlog.With("more", "attr").Debug("debug") // this is flagged as inappropriate use

timeafter
---------

`timeafter` is an analyzer that checks for the use of
[time.After](https://pkg.go.dev/time#After) instances in loops. As stated in its
documentation, the underlying Timer is not recovered by the garbage collector
until the timer fires.
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ go 1.24.0

require (
golang.org/x/exp v0.0.0-20230809094429-853ea248256d
golang.org/x/mod v0.28.0
golang.org/x/tools v0.37.0
)

require golang.org/x/sync v0.17.0 // indirect
require (
golang.org/x/mod v0.28.0 // indirect
golang.org/x/sync v0.17.0 // indirect
)
2 changes: 0 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package main
import (
"github.com/cilium/linters/ioreadall"
"github.com/cilium/linters/slowg"
"github.com/cilium/linters/timeafter"

"golang.org/x/tools/go/analysis/multichecker"
)
Expand All @@ -16,6 +15,5 @@ func main() {
multichecker.Main(
ioreadall.Analyzer,
slowg.Analyzer,
timeafter.Analyzer,
)
}
13 changes: 0 additions & 13 deletions timeafter/doc.go

This file was deleted.

33 changes: 0 additions & 33 deletions timeafter/testdata/time_after_not_in_for_loop.go

This file was deleted.

144 changes: 0 additions & 144 deletions timeafter/time_after.go

This file was deleted.

14 changes: 0 additions & 14 deletions timeafter/time_after_test.go

This file was deleted.

Loading