Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LibLaserCut
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Elektronikföreningen Admittansen
LibLaserCut
Commits
444612f4
Commit
444612f4
authored
12 years ago
by
Thomas Oster
Browse files
Options
Downloads
Patches
Plain Diff
added test-script for code sanity (to be extended)
parent
6bdaf024
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
copyrightheader
+18
-0
18 additions, 0 deletions
copyrightheader
test.sh
+20
-0
20 additions, 0 deletions
test.sh
with
38 additions
and
0 deletions
copyrightheader
0 → 100644
+
18
−
0
View file @
444612f4
/**
* This file is part of LibLaserCut.
* Copyright (C) 2011 - 2013 Thomas Oster <thomas.oster@rwth-aachen.de>
* RWTH Aachen University - 52062 Aachen, Germany
*
* LibLaserCut 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.
*
* LibLaserCut 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 LibLaserCut. If not, see <http://www.gnu.org/licenses/>.
**/
This diff is collapsed.
Click to expand it.
test.sh
0 → 100755
+
20
−
0
View file @
444612f4
#!/bin/bash
# Performs some sanity and code cleanness tests. Intended to be run before every commit
echo
"Checking for copryight header"
if
!
[
-f
copyrightheader
]
then
echo
"File 'copyrightheader' is missing"
exit
1
fi
HEADERSIZE
=
$(
wc
-l
< copyrightheader
)
ERRORS
=
0
for
f
in
$(
find src
-name
'*.java'
)
do
if
!
cat
$f
|head
-n
$HEADERSIZE
|diff - copyrightheader
>
/dev/null
then
echo
"Copyright header mismatch on
$f
"
ERRORS
=
1
fi
done
exit
$ERRORS
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment