diff --git a/.github/workflows/copywrite.yml b/.github/workflows/copywrite.yml new file mode 100644 index 0000000..1b72f36 --- /dev/null +++ b/.github/workflows/copywrite.yml @@ -0,0 +1,24 @@ +name: Check Copywrite Headers + +on: + pull_request: + push: + branches: + - "main" + +jobs: + copywrite: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + fetch-depth: 0 + - uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3 + name: Setup Copywrite + with: + version: v0.25.3 + archive-checksum: e43f4b72fff3f219c5a5f883438d63edd5b68f5bea90a5d18abb3001c8c3aedc + - name: Check Header Compliance + run: make copywriteheaders +permissions: + contents: read diff --git a/.golangci.yml b/.golangci.yml index 85ba7c9..90cf761 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,4 +1,4 @@ -# Copyright IBM Corp. 2019, 2025 +# Copyright IBM Corp. 2019, 2026 # SPDX-License-Identifier: MPL-2.0 version: "2" diff --git a/LICENSE b/LICENSE index 90eaf6d..466e285 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright IBM Corp. 2019, 2025 +Copyright IBM Corp. 2019, 2026 Mozilla Public License Version 2.0 ================================== diff --git a/Makefile b/Makefile index 566192e..3620efe 100644 --- a/Makefile +++ b/Makefile @@ -51,10 +51,15 @@ filter: @go build ./examples/filter deps: + @go install github.com/hashicorp/copywrite@b3e6599f43beff698f471c6f46888045453fa030 # v0.25.3 @go get github.com/mna/pigeon@master @go get golang.org/x/tools/cmd/goimports @go get golang.org/x/tools/cmd/cover @go mod tidy -.PHONY: generate test coverage fmt deps bench examples expr-parse expr-eval filter +copywriteheaders: + @echo "==> Running copywrite headers plan..." + @copywrite headers --plan + @echo "==> Done" +.PHONY: generate test coverage fmt deps bench examples expr-parse expr-eval filter diff --git a/bexpr_test.go b/bexpr_test.go index b9707ef..3d4a741 100644 --- a/bexpr_test.go +++ b/bexpr_test.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2019, 2025 +// Copyright IBM Corp. 2019, 2026 // SPDX-License-Identifier: MPL-2.0 package bexpr diff --git a/common_test.go b/common_test.go index 49ba0f8..e551f03 100644 --- a/common_test.go +++ b/common_test.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2019, 2025 +// Copyright IBM Corp. 2019, 2026 // SPDX-License-Identifier: MPL-2.0 package bexpr diff --git a/evaluate.go b/evaluate.go index b388464..b317e57 100644 --- a/evaluate.go +++ b/evaluate.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2019, 2025 +// Copyright IBM Corp. 2019, 2026 // SPDX-License-Identifier: MPL-2.0 package bexpr diff --git a/evaluate_test.go b/evaluate_test.go index 1013c5e..54a01fa 100644 --- a/evaluate_test.go +++ b/evaluate_test.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2019, 2025 +// Copyright IBM Corp. 2019, 2026 // SPDX-License-Identifier: MPL-2.0 package bexpr diff --git a/examples/expr-eval/expr-eval.go b/examples/expr-eval/expr-eval.go index de1c4ea..b1ba513 100644 --- a/examples/expr-eval/expr-eval.go +++ b/examples/expr-eval/expr-eval.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2019, 2025 +// Copyright IBM Corp. 2019, 2026 // SPDX-License-Identifier: MPL-2.0 package main diff --git a/filter.go b/filter.go index d5d60f5..ec962c9 100644 --- a/filter.go +++ b/filter.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2019, 2025 +// Copyright IBM Corp. 2019, 2026 // SPDX-License-Identifier: MPL-2.0 package bexpr diff --git a/grammar/ast.go b/grammar/ast.go index 2aad8e1..ffc9fae 100644 --- a/grammar/ast.go +++ b/grammar/ast.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2019, 2025 +// Copyright IBM Corp. 2019, 2026 // SPDX-License-Identifier: MPL-2.0 package grammar diff --git a/grammar/ast_test.go b/grammar/ast_test.go index 53d6ed7..e2f7fab 100644 --- a/grammar/ast_test.go +++ b/grammar/ast_test.go @@ -1,4 +1,4 @@ -// Copyright IBM Corp. 2019, 2025 +// Copyright IBM Corp. 2019, 2026 // SPDX-License-Identifier: MPL-2.0 package grammar