Skip to content

Commit

Permalink
Fixed license header on TestFiles and added check-headers.sh shell sc…
Browse files Browse the repository at this point in the history
…ript.
  • Loading branch information
Colby Skeggs committed May 12, 2015
1 parent ab80071 commit 8876f53
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
22 changes: 22 additions & 0 deletions CommonChickenRuntimeEngine/src/ccre/testing/TestFiles.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
/*
* Copyright 2015 Colby Skeggs
*
* This file is part of the CCRE, the Common Chicken Runtime Engine.
*
* The CCRE is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* The CCRE is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the CCRE. If not, see <http://www.gnu.org/licenses/>.
*
*
* This file contains code inspired by/based on code Copyright 2008-2014 FIRST.
* To see the license terms of that code (modified BSD), see the root of the CCRE.
*/
package ccre.testing;

import java.io.IOException;
Expand Down
30 changes: 30 additions & 0 deletions check-headers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
echo
echo Enumerating files...
echo
GOOD=true
for x in `find -name '*.java'`
do
if head -n 18 $x | grep -iE '(This file is part of the CCRE, the Common Chicken Runtime Engine[.]|Copyright \(c\) FIRST)' >/dev/null
then
true
else
if echo $x | grep -iE '(SampleIgneousRobot|cobertura|TemplateIgneousRobot)' >/dev/null
then
true
else
echo $x BAD
GOOD=false
fi
fi
done
echo
if $GOOD
then
echo Done enumerating. All files pass inspection.
echo
exit 0
else
echo Done enumerating. Not ready to commit. You forgot some license headers!
echo
exit 1
fi

0 comments on commit 8876f53

Please sign in to comment.