autoscaling icon indicating copy to clipboard operation
autoscaling copied to clipboard

linter for unused function return value

Open sharnoff opened this issue 5 months ago • 1 comments

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.

sharnoff avatar Mar 04 '24 13:03 sharnoff