Skip to content

Commit deaf1f6

Browse files
Add license check (#825)
* adding license check * add/update copyrights * add checklicense to gh checks * add make target to add license * fixup * swap to short form license * add copyright to yaml * and the rest of the yaml * fixup * address comments
1 parent 05e4eb5 commit deaf1f6

File tree

236 files changed

+502
-2727
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+502
-2727
lines changed

.dockerignore

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
1+
142

153
.github
164
docs

.env

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
1+
142

153
# Images
164
IMAGE_VERSION=1.3.1

.gitattributes

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
1+
142

153
* text=auto
164

.github/component_owners.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
13
# this file is used by .github/workflows/assign-reviewers.yml
24
components:
35
src/adservice:

.github/dependabot.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
13
version: 2
24
updates:
35
- package-ecosystem: "github-actions"

.github/workflows/assign-reviewers.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
13
# assigns reviewers to pull requests in a similar way as CODEOWNERS, but doesn't require reviewers
24
# to have write access to the repository
35
# see .github/component_owners.yaml for the list of components and their owners

.github/workflows/checks.yml

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
13
name: Checks
24

35
on:
@@ -62,3 +64,13 @@ jobs:
6264

6365
- name: run sanitycheck.py
6466
run: python3 ./internal/tools/sanitycheck.py
67+
68+
checklicense:
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: check out code
72+
uses: actions/checkout@v3
73+
- name: install tools
74+
run: make install-tools
75+
- name: run checklicense
76+
run: make checklicense

.github/workflows/gradle-wrapper-validation.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
13
name: Gradle wrapper validation
24
on:
35
pull_request:

.github/workflows/release.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
13
name: "Build and Publish"
24

35
on:

.github/workflows/stale.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
13
# Syntax: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
24
# Github Actions Stale: https://github.com/actions/stale
35

.gitignore

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
1-
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
1+
142

153
*~
164
*.iml

.licenserc.json

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"**/*.{go,cs,h,cpp,js,ts,tsx,rs}": [
3+
"// Copyright The OpenTelemetry Authors",
4+
"// SPDX-License-Identifier: Apache-2.0"
5+
],
6+
"**/*.php": [
7+
"<?php",
8+
"// Copyright The OpenTelemetry Authors",
9+
"// SPDX-License-Identifier: Apache-2.0"
10+
],
11+
"**/*.java": [
12+
"/*",
13+
"* Copyright The OpenTelemetry Authors",
14+
"* SPDX-License-Identifier: Apache-2.0",
15+
"*/"
16+
],
17+
"**/*.py": [
18+
"#!/usr/bin/python",
19+
"# Copyright The OpenTelemetry Authors",
20+
"# SPDX-License-Identifier: Apache-2.0"
21+
],
22+
"**/*.{ex,exs,rb,yaml,yml,sh,yamllint}": [
23+
"# Copyright The OpenTelemetry Authors",
24+
"# SPDX-License-Identifier: Apache-2.0"
25+
],
26+
"**/{Dockerfile,Makefile}": [
27+
"# Copyright The OpenTelemetry Authors",
28+
"# SPDX-License-Identifier: Apache-2.0"
29+
],
30+
"ignore": [
31+
"node_modules/",
32+
"src/cartservice/src/obj/",
33+
"src/cartservice/tests/obj/",
34+
"src/featureflagservice/assets/vendor/",
35+
"src/featureflagservice/priv/",
36+
"internal/tools/"
37+
]
38+
}

.markdownlint.yaml

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
143

154
# Default state for all rules
165
default: true

.yamllint

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
14-
2+
# SPDX-License-Identifier: Apache-2.0
153
extends: default
164

175
ignore-from-file: [.gitignore, .yamlignore]

Makefile

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
3+
144

155
# All documents to be used in spell check.
166
ALL_DOCS := $(shell find . -type f -name '*.md' -not -path './.github/*' -not -path '*/node_modules/*' -not -path '*/_build/*' -not -path '*/deps/*' | sort)
@@ -57,9 +47,19 @@ install-yamllint:
5747
yamllint:
5848
yamllint .
5949

50+
.PHONY: checklicense
51+
checklicense:
52+
@echo "Checking license headers..."
53+
npx @kt3k/license-checker -q
54+
55+
.PHONY: addlicense
56+
addlicense:
57+
@echo "Adding license headers..."
58+
npx @kt3k/license-checker -q -i
59+
6060
# Run all checks in order of speed / likely failure.
6161
.PHONY: check
62-
check: misspell markdownlint
62+
check: misspell markdownlint checklicense
6363
@echo "All checks complete"
6464

6565
# Attempt to fix issues / regenerate tables.

docker-compose.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
# Copyright The OpenTelemetry Authors
2-
#
3-
# Licensed under the Apache License, Version 2.0 (the "License");
4-
# you may not use this file except in compliance with the License.
5-
# You may obtain a copy of the License at
6-
#
7-
# http://www.apache.org/licenses/LICENSE-2.0
8-
#
9-
# Unless required by applicable law or agreed to in writing, software
10-
# distributed under the License is distributed on an "AS IS" BASIS,
11-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
# See the License for the specific language governing permissions and
13-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
3+
144

155
version: '3.9'
166
x-default-logging: &logging

ide-gen-proto.sh

+3-13
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
#!/bin/sh
21
# Copyright The OpenTelemetry Authors
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
2+
# SPDX-License-Identifier: Apache-2.0
3+
#!/bin/sh
4+
155

166
# This script is used to generate protobuf files for all services.
177
# Useful to ensure code can compile without Docker, and provide hints for IDEs.

internal/tools/sanitycheck.py

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
11
#!/usr/bin/env python3
22

3-
# Copyright The OpenTelemetry Authors
4-
#
5-
# Licensed under the Apache License, Version 2.0 (the "License");
6-
# you may not use this file except in compliance with the License.
7-
# You may obtain a copy of the License at
8-
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10-
#
11-
# Unless required by applicable law or agreed to in writing, software
12-
# distributed under the License is distributed on an "AS IS" BASIS,
13-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
# See the License for the specific language governing permissions and
15-
# limitations under the License.
3+
164

175
import glob
186
import os

internal/tools/tools.go

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
// Copyright 2019, OpenTelemetry Authors
2-
//
3-
// Licensed under the Apache License, Version 2.0 (the "License");
4-
// you may not use this file except in compliance with the License.
5-
// You may obtain a copy of the License at
6-
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
8-
//
9-
// Unless required by applicable law or agreed to in writing, software
10-
// distributed under the License is distributed on an "AS IS" BASIS,
11-
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
// See the License for the specific language governing permissions and
13-
// limitations under the License.
141
//
152

3+
//go:build tools
164
// +build tools
175

186
package tools

kubernetes/opentelemetry-demo.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copyright The OpenTelemetry Authors
2+
# SPDX-License-Identifier: Apache-2.0
13
---
24
# Source: opentelemetry-demo/charts/grafana/templates/serviceaccount.yaml
35
apiVersion: v1

0 commit comments

Comments
 (0)