Check for license on commit

Benjamin Meyer ben at meyerhome.net
Wed May 11 01:42:29 BST 2005


On Tuesday 10 May 2005 7:30 pm, David Faure wrote:
> On Tuesday 10 May 2005 16:38, Benjamin Meyer wrote:
> > In my personal svn I have added the following pre-commit check to make
> > sure that every file that I add/modify has a proper license.  There are a
> > lot of files inside KDE that do not conform to the KDE licencing policy
> > (daily report: http://kde.icefox.net/tests/report.html).  What do you
> > think of adding this to the pre-commit hook script to prevent more source
> > without a license?
> >
> > $CHECKLICENSES /tmp/$$ > /tmp/$$/check 2> /tmp/$$/check_error || exit 1
>
> What about images? sounds? READMEs? ... ?

Well the checklicense script should handle them if we want it to check them :)

> > count=`cat /tmp/27897/check | wc -l`
>
> ^ obvious bug there (hardcoded pid)

woops, yeah for X copy and paste, that was a paste of my previous test one, 
not the highlighted real one :).  Here is the real line:

count=`cat /tmp/$$/check | grep "^!" | wc -l

There might be other issues in my little 10 line script that I don't know 
about yet.

I really just wanted to bring this up as an idea.  Using existing test scripts 
for things that can be automatically validated done at commit time rather 
then manually later.  Another one would be checking icons that are committed 
with the name crystal_48.png to see if they are really 48x48 as many images 
in kde are not the dimensions that the file name says they are.

-Benjamin Meyer


-- 
aka icefox
Public Key: http://www.icefox.net/public_key.asc




More information about the kde-core-devel mailing list