Krazy license checker

Jaison Lee lee.jaison at gmail.com
Tue Jan 30 17:03:57 CET 2007


> I've been looking at your Krazy license checker. It does a good job, but
> there's a couple of little tweaks I'd like to make:

Please feel free to do whatever you like. The structure and design of
the license checker predates me by quite a bit. It just wasn't very
accurate at first, and I made it a personal vendetta to try and catch
more sidecases. The problem was (and still is) that there is no
uniformity in how the files designate their license. There are a dozen
different ways for a file to say it is GPL, anywhere from having a
huge block of text to just a one-line "This file is GPL." Getting a
ruling from kde-policies on what is and isn't a legal way of declaring
your license and getting everyone to agree on changing almost every
file is likely to be an exercise in futility.

> 1) The BSD license isn't checked, but the disclaimer of warranty is. This
> makes many files (when you use --verbose --quiet) weirdly "licensed": BSD
> LGPL, for instance. I'd like to change it to check more closely for one of
> the two clauses of the BSD license, and to move the disclaimer of warranty to
> a (no-warranty) annotation at the end of the --verbose output.

Yes, IIRC the BSD and MIT licenses were very hard to work with. At the
time, my primary concern was making sure that it always detected when
there WAS a license, even if it did not always correctly guess the
right one. Be careful while working on this, though: There ARE files
with multiple licenses out there.

> 2) Have you got any other plans for the license / copyright / header checkers?

Allen had a good idea about checking for COPYING and AUTHORS files in
the same or parent directory, but I haven't really put that much
thought into the implementation.

Make sure you use a huge sample for testing; it took me a long time to
track down all the sidecases. kdelibs, kdegames and kdenetwork in
particular are gold mines for wierd licenses.


More information about the kde-quality mailing list