You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
metrics: Descriptions on multi-line comments are not parsed correctly #1999
In metric definitions with long comments, the script metricsgen could take the metric description from a one-line comment starting with //metrics:. Some of these comments are wrongly prefixed with // metrics:, with an extra space, thus they are ignored by the script. For example, in internal/consensus/metrics.go and internal/state/metrics.go.
Moreover, the go formatter will automatically insert a space after //, breaking the metric descriptions.
Proposed solutions
Either:
fix the formatter to not insert spaces in //metrics:, or
add the affected lines lint commands to ignore the formatter, or
change metricsgen to accept lines with // metrics:.
Activity
cason commentedon Jan 22, 2024
The problem is with
gofumptactually, introduced by #604.scripts: metricsgen parses '// metrics:' pattern (#2090)
scripts: metricsgen parses '// metrics:' pattern (#2090)