Open rockdaboot opened 3 months ago
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
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
or as