2,065 bytes removed ,  21 February 2007
no edit summary
(→‎Continuation chars fix: Examples added)
No edit summary
 
Line 6: Line 6:


== Improving relic ==
== 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.
Examples:
* mozilla/js/tamarin/core/abcFormat.txt
* mozilla/js/tamarin/test/shell.as
* mozilla/js/tamarin/test/as3/AbcDecoder/useNS.as
* mozilla/js/tamarin/test/as3/AbcDecoder/typeAnnotation.as
* mozilla/js/tamarin/test/as3/AbcDecoder/accessSpecifiers.as
=== 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.
To fix this, we stop scanning, if the second license block is more than 10 lines away from the first license block.
Some examples:
* mozilla/calendar/base/src/maketzdata.pl
* mozilla/extensions/java/xpcom/interfaces/gen-nsError.pl
* mozilla/intl/chardet/tools/genverifier.pm
* mozilla/intl/chardet/tools/gencyrillic.pl
* mozilla/intl/chardet/tools/charfreqtostat.pl
* mozilla/intl/chardet/tools/GenCyrillicClass.cpp
* mozilla/intl/lwbrk/tools/anzx4501.pl


=== Turn relic into a Tinderbox test ===
=== Turn relic into a Tinderbox test ===
28

edits