User:FeyP: Difference between revisions
(added info on relic work) |
(Added example for file autogenerating a file) |
||
| Line 20: | Line 20: | ||
At the moment, several files are labelled as silly things like "mpl/gpl/lgpl/mpl/gpl/lgpl", because they have a proper license block, but then another copy of the license in the body (because they autogenerate a file, for example). That needs to stop, but ideally without preventing us flagging up the case where there are two license headers in a file, one after the other. | At the moment, several files are labelled as silly things like "mpl/gpl/lgpl/mpl/gpl/lgpl", because they have a proper license block, but then another copy of the license in the body (because they autogenerate a file, for example). That needs to stop, but ideally without preventing us flagging up the case where there are two license headers in a file, one after the other. | ||
Examples: | |||
* mozilla/calendar/base/src/maketzdata.pl | |||
=== Turn relic into a Tinderbox test === | === Turn relic into a Tinderbox test === | ||
Revision as of 10:06, 10 February 2007
Blog: http://blog.nachtarbeiter.net/
Mozilla-related emails: bugzilla at nachtarbeiter dot net
Improving relic
Continuation chars fix
If you run relic on some of the new Tamarin files (js/tamarin), you'll see the problem. These have had a duff license block applied which relic doesn't correctly fix - it doesn't insert the "continuation character" at the beginning of each line because it's not there in the original. " *" is an example of a continuation character for the /* */ comment type.
The change: when writing out the new license block, we need to use the continuation char defined inside relic for that comment type, not one scanned from the file itself.
Make relic cope with non-tri-license Version headers
People have started using the LICENSE BLOCK headers with a different license name, and relic doesn't cope well. It should. One example is ./gfx/thebes/src/gfxQuartzFontCache.mm . Relic should probably categorise these as "unknown license" for now.
Make relic stop scanning a file if it detects a proper complete MPL/LGPL/GPL license block
At the moment, several files are labelled as silly things like "mpl/gpl/lgpl/mpl/gpl/lgpl", because they have a proper license block, but then another copy of the license in the body (because they autogenerate a file, for example). That needs to stop, but ideally without preventing us flagging up the case where there are two license headers in a file, one after the other.
Examples:
- mozilla/calendar/base/src/maketzdata.pl
Turn relic into a Tinderbox test
If I'm not to spend the rest of my life checking licensing, we need to turn relic into a tinderbox test, so people know immediately when they've checked in bad files or blocks. That is, we need a command line switch which puts it into a mode where it returns 0 if the results are of a certain form, or 1 (and some errors) otherwise (See http://developer.mozilla.org/en/docs/How_to_add_a_build-time_test for more info)
The form would be that all files either have MPL/LGPL/GPL (complete), unknown license or no license, and there are no processing errors.