chore(linter): disable linter warning for freeze() in starlark (#12406)

This commit is contained in:
Sven Rebhan 2022-12-16 14:26:19 +01:00 committed by GitHub
parent 754ab64959
commit 7fb90a2d9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -38,6 +38,10 @@ func (d FieldDict) Type() string {
}
func (d FieldDict) Freeze() {
// Disable linter check as the frozen variable is modified despite
// passing a value instead of a pointer, because `FieldDict` holds
// a pointer to the underlying metric containing the `frozen` field.
//revive:disable:modifies-value-receiver
d.frozen = true
}

View File

@ -37,6 +37,10 @@ func (d TagDict) Type() string {
}
func (d TagDict) Freeze() {
// Disable linter check as the frozen variable is modified despite
// passing a value instead of a pointer, because `TagDict` holds
// a pointer to the underlying metric containing the `frozen` field.
//revive:disable:modifies-value-receiver
d.frozen = true
}