Skip to content

Commit 5d4bf2c

Browse files
committed
app.py: Sort license entries in index.* file by their key
Re-generating the `docs` by utilizing [1] on my machine running Ubuntu for ScanCode version `31.1.0` produces the same entries for the licenses but differs in terms of their ordering compared to [1]. This is why I assume that the ordering is not deterministic, but somehow dependends on the host system. Sort the license entries by their license key to ensure a deterministic order independent of a host system. This leads to nicer diffs for documentation updates. [1] `make clean build` [2] d29ed2c Signed-off-by: Frank Viernau <[email protected]>
1 parent d29ed2c commit 5d4bf2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
from licensedcode.models import load_licenses
3939
from scancode_config import __version__ as scancode_version
4040

41-
licenses = load_licenses(with_deprecated=True)
41+
licenses = dict(sorted(load_licenses(with_deprecated=True).items()))
4242

4343
# GitHub Pages support only /(root) or docs/ for the source
4444
BUILD_LOCATION = "docs"

0 commit comments

Comments
 (0)