Skip to content

Commit 9303150

Browse files
austinvallebflad
andauthored
[COMPLIANCE] Add copyright and license headers (#292)
* add copywrite changes * mod tidy? * add back to go mod + ignores * add --plan * add `make tools` * [COMPLIANCE] Add copyright and license headers * update protobuf GH workflow * add ignore to pb.go only * reverted back to the original protoc version * Update .copywrite.hcl Co-authored-by: Brian Flad <[email protected]> --------- Co-authored-by: Brian Flad <[email protected]>
1 parent cb2ab32 commit 9303150

File tree

128 files changed

+1275
-11
lines changed

Some content is hidden

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

128 files changed

+1275
-11
lines changed

.copywrite.hcl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
schema_version = 1
2+
3+
project {
4+
license = "MPL-2.0"
5+
copyright_year = 2020
6+
7+
header_ignore = [
8+
# changie tooling configuration and CHANGELOG entries (prose)
9+
".changes/unreleased/*.yaml",
10+
".changie.yaml",
11+
12+
# GitHub issue template configuration
13+
".github/ISSUE_TEMPLATE/*.yml",
14+
15+
# GitHub Actions workflow-specific configurations
16+
".github/labeler-*.yml",
17+
18+
# golangci-lint tooling configuration
19+
".golangci.yml",
20+
21+
# GoReleaser tooling configuration
22+
".goreleaser.yml",
23+
24+
# Release Engineering tooling configuration
25+
".release/*.hcl",
26+
]
27+
}

.github/CONTRIBUTING.md

Lines changed: 8 additions & 0 deletions

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ updates:
1111
- dependency-name: "github.com/hashicorp/go-hclog"
1212
schedule:
1313
interval: "daily"
14+
- package-ecosystem: "gomod"
15+
directory: "/tools"
16+
schedule:
17+
interval: "daily"

.github/workflows/ci-protobuf.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ jobs:
3131
# https://github.com/arduino/setup-protoc/issues/33
3232
version: '3.19.4'
3333
- run: go mod download
34-
- run: go install google.golang.org/protobuf/cmd/protoc-gen-go
35-
- run: go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
34+
- run: make tools
3635
- run: make protoc
3736
- name: git diff
3837
run: |

.github/workflows/compliance.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: compliance
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
# Reference: ENGSRV-059
11+
copywrite:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
15+
- uses: hashicorp/setup-copywrite@867a1a2a064a0626db322392806428f7dc59cb3e # v1.1.2
16+
- run: copywrite headers --plan
17+
- run: copywrite license --plan

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ default: test
33
lint:
44
golangci-lint run ./...
55

6+
tools:
7+
go install google.golang.org/protobuf/cmd/protoc-gen-go
8+
cd tools; go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
9+
610
# Protocol Buffers compilation is done outside of 'go generate' handling since
711
# the 'protoc' tool is not installable via 'go install'.
812
protoc:
@@ -26,4 +30,8 @@ protoc:
2630
test:
2731
go test ./...
2832

29-
.PHONY: default lint protoc test
33+
# Generate copywrite headers
34+
generate:
35+
cd tools; go generate ./...
36+
37+
.PHONY: default lint protoc test tools

README.md

Lines changed: 3 additions & 3 deletions

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ require (
1212
github.com/mitchellh/go-testing-interface v1.14.1
1313
github.com/vmihailenco/msgpack/v5 v5.3.5
1414
google.golang.org/grpc v1.55.0
15-
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0
1615
google.golang.org/protobuf v1.30.0
1716
)
1817

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 h1:DdoeryqhaXp1LtT
6060
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4/go.mod h1:NWraEVixdDnqcqQ30jipen1STv2r/n24Wb7twVTGR4s=
6161
google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag=
6262
google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
63-
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA=
64-
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0/go.mod h1:Dk1tviKTvMCz5tvh7t+fh94dhmQVHuCt2OzJB3CTW9Y=
6563
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
6664
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
6765
google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng=

internal/logging/context.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) HashiCorp, Inc.
2+
// SPDX-License-Identifier: MPL-2.0
3+
14
package logging
25

36
import (

0 commit comments

Comments
 (0)