statistics

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 4 Imported by: 0

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