Skip to content

Commit ede8359

Browse files
authored
Automatic Copyright Header Checking (#9)
1 parent 1a127ee commit ede8359

File tree

6 files changed

+111
-0
lines changed

6 files changed

+111
-0
lines changed

.github/license-check/config.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
[
2+
{
3+
"include": [
4+
"**/*.ts",
5+
"**/*.scala",
6+
"server/build.sbt"
7+
],
8+
"exclude": [
9+
"client/node_modules/**",
10+
"client/src/evaluate/index.ts",
11+
"client/src/evaluate/runEvaluation.ts",
12+
"client/src/test/index.ts",
13+
"client/src/test/runTest.ts",
14+
"server/gobra/**",
15+
"server/project/project/**",
16+
"server/project/target/**",
17+
"server/target/**"
18+
],
19+
"license": "./.github/license-check/headers/MPLv2-ETH.txt"
20+
},
21+
{
22+
"include": [
23+
"client/src/evaluate/index.ts",
24+
"client/src/evaluate/runEvaluation.ts",
25+
"client/src/test/index.ts",
26+
"client/src/test/runTest.ts",
27+
"client/webpack.config.js"
28+
],
29+
"license": "./.github/license-check/headers/MIT-Microsoft.txt"
30+
},
31+
{
32+
"include": [
33+
"**/*.gobra",
34+
"**/*.go"
35+
],
36+
"exclude": [
37+
"server/gobra/**"
38+
],
39+
"license": "./.github/license-check/headers/CC0.txt"
40+
},
41+
{
42+
"include": [
43+
"client/node_modules/**",
44+
"client/.vscode-test/**",
45+
"client/images/**",
46+
"client/tmp/**",
47+
"client/evaluationResults.txt",
48+
"client/package-notes.md",
49+
"server/gobra/**",
50+
"server/project/build.properties",
51+
"server/project/plugins.sbt",
52+
"server/project/project/**",
53+
"server/project/target/**",
54+
"server/target/**",
55+
"**/*.json",
56+
".github/check-license/**",
57+
"**/README.md",
58+
"**/LICENSE"
59+
]
60+
}
61+
]
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// Any copyright is dedicated to the Public Domain.
2+
// http://creativecommons.org/publicdomain/zero/1.0/
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) Microsoft Corporation
2+
//
3+
// All rights reserved.
4+
//
5+
// MIT License
6+
//
7+
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
8+
// files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
9+
// modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
10+
// is furnished to do so, subject to the following conditions:
11+
//
12+
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13+
//
14+
// THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
15+
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
16+
// BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
17+
// OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// This Source Code Form is subject to the terms of the Mozilla Public
2+
// License, v. 2.0. If a copy of the MPL was not distributed with this
3+
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
//
5+
// Copyright (c) %regexp:\d{4}%-%year% ETH Zurich.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this
3+
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4+
#
5+
# Copyright (c) 2011-2020 ETH Zurich.
6+
7+
name: license-check
8+
9+
on:
10+
pull_request:
11+
12+
jobs:
13+
check-license-headers:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout Gobra-IDE
17+
uses: actions/checkout@v2
18+
- name: Check license headers
19+
uses: viperproject/check-license-header@v1
20+
with:
21+
path: ./
22+
config: ./.github/license-check/config.json
23+
strict: true

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,6 @@ JDK version 11 is working (assuming [Homebrew](https://brew.sh) is used):
3333
3. Press Ctrl+Shift+B resp. Cmd+Shift+B to compile the client.
3434
4. Open the 'Run and Debug' view container and run the 'Launch Client' task.
3535
This will automatically start the server as well
36+
37+
## Locally checking license headers:
38+
Run `npx github:viperproject/check-license-header#v1 check --config .github/license-check/config.json --strict` in the repository's root directory to check whether all files adhere to the license configuration

0 commit comments

Comments
 (0)