MCPcopy Index your code
hub / github.com/coder/coder / withTimezoneUTC

Function withTimezoneUTC

scripts/rules.go:453–460  ·  view source on GitHub ↗

withTimezoneUTC ensures that we don't just sprinkle dbtestutil.WithTimezone("UTC") about to work around real timezone bugs in our code. nolint:unused,deadcode,varnamelen

(m dsl.Matcher)

Source from the content-addressed store, hash-verified

451//
452//nolint:unused,deadcode,varnamelen
453func withTimezoneUTC(m dsl.Matcher) {
454 m.Match(
455 `dbtestutil.WithTimezone($tz)`,
456 ).Where(
457 m["tz"].Text.Matches(`[uU][tT][cC]"$`),
458 ).Report(`Setting database timezone to UTC may mask timezone-related bugs.`).
459 At(m["tz"])
460}
461
462// workspaceActivity ensures that updating workspace activity is only done in the workspacestats package.
463//

Callers

nothing calls this directly

Calls 3

MatchMethod · 0.80
ReportMethod · 0.65
MatchesMethod · 0.45

Tested by

no test coverage detected