chore(linter): disable linter warning for freeze() in starlark (#12406)
This commit is contained in:
parent
754ab64959
commit
7fb90a2d9c
|
|
@ -38,6 +38,10 @@ func (d FieldDict) Type() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d FieldDict) Freeze() {
|
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
|
d.frozen = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,10 @@ func (d TagDict) Type() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d TagDict) Freeze() {
|
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
|
d.frozen = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue