We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to reproduce:
LICENSE
zig init-exe
zigmod init
The process will hang for a long time.
The text was updated successfully, but these errors were encountered:
I found the reason. Zig detect license gets the levenstein distance of the entire file (1KB).
pub fn detect(alloc: std.mem.Allocator, license_src: []const u8) ![]const u8 { var min: ?usize = null; var ind: ?usize = null; for (licenses.spdx) |item, i| { const distance = try leven.leven(u8, alloc, license_src, item[1], min); if (min == null or distance < min.?) { min = distance; ind = i; } } return licenses.spdx[ind.?][0]; }
Sorry, something went wrong.
No branches or pull requests
How to reproduce:
LICENSE
zig init-exe
zigmod init
The process will hang for a long time.
The text was updated successfully, but these errors were encountered: