autoscaling
autoscaling copied to clipboard
linter for unused function return value
Problem description / Motivation
As an example, #807 was caused by failing to call .Inc()
on the prometheus.Counter
returned by WithLabelValues(...)
.
It'd be good to have automated checking of this to reduce the impact of making a similar mistake in the future.
Feature idea(s) / DoD
DoD: we have a linter as part of the lints workflow that would have caught #807. Consider handling other common types as well.
Implementation ideas
I briefly searched for such a linter, but couldn't find any.