Skip to content

Conversation

rockdaboot
Copy link

In case of two result entries with equal confidence level, the order of these entries is randomized. This makes comparing two result sets non-trivial.

This PR orders the result entries by confidence first and by license name second to achieve a stable output.

Example:
The two top entries have the same confidence level and thus appear either as

$ ./license-detector https://github.com/gogo/protobuf | head -3
https://github.com/gogo/protobuf
        100%    BSD-2-Clause
        100%    0BSD

or as

https://github.com/gogo/protobuf
        100%    0BSD
        100%    BSD-2-Clause

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant