util/promlint/promlint.go
func lint(mf dto.MetricFamily) []Problem {
	fns := []func(mf dto.MetricFamily) []Problem{
		lintHelp,
		lintMetricUnits,
		lintCounter,
		lintHistogramSummaryReserved,
	}

	var problems []Problem
	for _, fn := range fns {
		problems = append(problems, fn(mf)...)
	}

	// TODO(mdlayher): lint rules for specific metrics types.
	return problems
}
func lint(mf dto.MetricFamily) []Problem {
	fns := []func(mf dto.MetricFamily) []Problem{
		lintHelp,
		lintMetricUnits,
		lintCounter,
		lintHistogramSummaryReserved,
	}

	var problems []Problem
	for _, fn := range fns {
		problems = append(problems, fn(mf)...)
	}

	// TODO(mdlayher): lint rules for specific metrics types.
	return problems
}
func lint ( mf dto . MetricFamily ) [ ] Problem { fns := [ ] func ( mf dto . MetricFamily ) [ ] Problem { lintHelp , lintMetricUnits , lintCounter , lintHistogramSummaryReserved , } var problems [ ] Problem for _ , fn := range fns { problems = append ( problems , fn ( mf ) ... ) } // TODO(mdlayher): lint rules for specific metrics types. return problems }
// lint is the entry point for linting a single metric.
lint is the entry point for linting a single metric .