Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Update sorting in the normalize-yml command
Browse files Browse the repository at this point in the history
Update the sort rules in the normalize-yml command to be consistent
with the sorting done in the convert-cisagov command. That is to sort
by vendor and then product for a human-friendly sorted output.
  • Loading branch information
mcdonnnj committed Jan 20, 2022
1 parent 0b5ad90 commit 6c71afa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/yml/normalize_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def normalize(data: YamlData) -> YamlData:

def sort(data: YamlData) -> YamlData:
"""Sort the software entries."""
data["software"].sort(key=lambda x: (x["vendor"] + x["product"]).lower())
data["software"].sort(key=lambda x: (x["vendor"].lower(), x["product"].lower()))
return data


Expand Down

0 comments on commit 6c71afa

Please sign in to comment.