Skip to content

Commit

Permalink
fix: Sort parameters in docs (#554)
Browse files Browse the repository at this point in the history
This makes the docs output stable.
  • Loading branch information
zephyrdb authored Dec 7, 2024
1 parent 67e69cd commit fdfe524
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/commands/document.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ func getDocumentation(path string, outputDirectory string) (map[rego.Severity][]
if len(policy.AnnotationParameters()) > 0 {
parameters = annoParamsToLegacyFormat(policy.AnnotationParameters())
}
sort.Slice(parameters, func(i, j int) bool {
return parameters[i].Name < parameters[j].Name
})

header := Header{
Title: documentTitle,
Expand Down

0 comments on commit fdfe524

Please sign in to comment.