statistics

package
v0.42.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 6 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateQualityScore added in v0.18.1

func CalculateQualityScore(resultSet *model.RuleResultSet) int

CalculateQualityScore calculates the quality score based on the number of errors, warnings, and info messages. This is the single source of truth for score calculation logic. Returns a score between 10 and 100, where: - Info messages deduct 0.1 points each - Warnings deduct 0.3 points each - Errors deduct 15 points each - oas3-schema violations deduct an additional 90 points - Minimum score is 10 (never returns 0 or negative) - If no errors but score would be negative, floor at 25

func CreateReportStatistics

func CreateReportStatistics(index *index.SpecIndex, info *datamodel.SpecInfo, results *model.RuleResultSet) *reports.ReportStatistics

CreateReportStatistics generates a ready to render breakdown of the document's statistics. A convenience function that reduces churn on building stats over and over for different interfaces.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL