mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: wire up usage tracking for managed agents (#19096)
Wires up the usage collector and publisher to coderd. Relates to coder/internal#814
This commit is contained in:
+3
-1
@@ -37,7 +37,9 @@ func dbauthzAuthorizationContext(m dsl.Matcher) {
|
||||
Where(
|
||||
m["c"].Type.Implements("context.Context") &&
|
||||
// Only report on functions that start with "As".
|
||||
m["f"].Text.Matches("^As"),
|
||||
m["f"].Text.Matches("^As") &&
|
||||
// Ignore test usages of dbauthz contexts.
|
||||
!m.File().Name.Matches(`_test\.go$`),
|
||||
).
|
||||
// Instructions for fixing the lint error should be included on the dangerous function.
|
||||
Report("Using '$f' is dangerous and should be accompanied by a comment explaining why it's ok and a nolint.")
|
||||
|
||||
Reference in New Issue
Block a user