Skip to content

Commit 8f696f8

Browse files
committed
Rename function and add synopsis
1 parent 13bd45f commit 8f696f8

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

bin/formatjson.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Get-ChildItem $Dir -Filter "$App.json" -Recurse | ForEach-Object {
4040
# Parse JSON
4141
$json = [PSCustomObject](parse_json -path $file)
4242

43-
# Sort JSON root properties
44-
$json = [PSCustomObject](Sort-ScoopManifestRootProperties -JsonAsObject $json)
43+
# Sort JSON root properties according to schema.json, and level one child properties alphabetically
44+
$json = [PSCustomObject](Sort-ScoopManifestProperties -JsonAsObject $json)
4545

4646
# Beautify
4747
$json = [string](ConvertToPrettyJson -data $json)

lib/json.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ function normalize_values([psobject] $json) {
213213
return $json
214214
}
215215

216-
function Sort-ScoopManifestRootProperties {
216+
function Sort-ScoopManifestProperties {
217+
<#
218+
.SYNOPSIS
219+
Sort JSON root properties according to schema.json, and level one child properties alphabetically.
220+
#>
217221
[OutputType([PSCustomObject])]
218222

219223
Param(

0 commit comments

Comments
 (0)