Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) HashiCorp, Inc.
# Copyright IBM Corp. 2023, 2025
# SPDX-License-Identifier: MPL-2.0
version: 2
before:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) HashiCorp, Inc.
# Copyright IBM Corp. 2023, 2025
# SPDX-License-Identifier: MPL-2.0

---
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2022 HashiCorp, Inc.
Copyright IBM Corp. 2023, 2025

Mozilla Public License Version 2.0
==================================
Expand Down
2 changes: 1 addition & 1 deletion cmd/debug.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/dispatch.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/headers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/init.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/license.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/report.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/report_prs.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/report_repos.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/utils.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion cmd/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package cmd
Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package config
Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package config
Expand Down
2 changes: 1 addition & 1 deletion dispatch/dispatch.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package dispatch
Expand Down
2 changes: 1 addition & 1 deletion github/actions/core.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package actions
Expand Down
2 changes: 1 addition & 1 deletion github/actions/core_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package actions
Expand Down
2 changes: 1 addition & 1 deletion github/client.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package github
Expand Down
2 changes: 1 addition & 1 deletion github/repo.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package github
Expand Down
2 changes: 1 addition & 1 deletion licensecheck/copyright.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package licensecheck
Expand Down
15 changes: 1 addition & 14 deletions licensecheck/copyright_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package licensecheck
Expand All @@ -14,7 +14,6 @@
AppFs := afero.NewOsFs()
tempDir := t.TempDir()

desiredCopyrightString := "Copyright (c) 2022 HashiCorp, Inc."

cases := []struct {
description string
Expand All @@ -32,14 +31,12 @@
},
{
description: "Valid copyright statement should pass",
fileContents: "Copyright (c) 2022 HashiCorp, Inc.",
caseSensitive: false,
expectedValid: true,
expectedError: nil,
},
{
description: "Valid copyright statement with language headers should pass",
fileContents: "#!/bin/bash\nCopyright (c) 2022 HashiCorp, Inc.",
caseSensitive: false,
expectedValid: true,
expectedError: nil,
Expand All @@ -53,7 +50,6 @@
},
{
description: "Malformed copyright statement without year should fail",
fileContents: "Copyright (c) HashiCorp, Inc.",
caseSensitive: false,
expectedValid: false,
expectedError: nil,
Expand All @@ -74,37 +70,32 @@
},
{
description: "Valid lowercase copyright statement should pass",
fileContents: "copyright (c) 2022 hashicorp, inc.",
caseSensitive: false,
expectedValid: true,
expectedError: nil,
},
{
description: "valid uppercase copyright statement should pass",
fileContents: "COPYRIGHT (C) 2022 HASHICORP, INC.",
caseSensitive: false,
expectedValid: true,
expectedError: nil,
},
{
description: "Valid lowercase copyright statement with case sensitivity on should fail",
fileContents: "copyright (c) 2022 hashicorp, inc.",
caseSensitive: true,
expectedValid: false,
expectedError: nil,
},
{
description: "valid uppercase copyright statement with case sensitivity on should fail",
fileContents: "COPYRIGHT (C) 2022 HASHICORP, INC.",
caseSensitive: true,
expectedValid: false,
expectedError: nil,
},
{
description: "valid copyright statement on document that has the copyright word elsewhere should pass",
fileContents: `Copyright (c) 2022 HashiCorp, Inc.

Apache License

Check failure on line 98 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / test

missing ',' in composite literal

Check failure on line 98 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected name License in composite literal; possibly missing comma or }
Version 2.0, January 2004
http://www.apache.org/licenses/

Expand All @@ -112,11 +103,11 @@

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,

Check failure on line 106 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected for in composite literal; possibly missing comma or }
and distribution as defined by Sections 1 through 9 of this document.

Check failure on line 107 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected name distribution, expected := or = or comma

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.`,

Check failure on line 110 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected name copyright, expected semicolon or newline
caseSensitive: false,
expectedValid: true,
expectedError: nil,
Expand All @@ -124,18 +115,18 @@
{
description: "missing statement on document that has the copyright word elsewhere should fail",
fileContents: `Apache License
Version 2.0, January 2004

Check failure on line 118 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected literal 2.0 at end of statement
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

Check failure on line 121 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected name AND at end of statement

1. Definitions.

Check failure on line 123 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected name Definitions at end of statement

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

Check failure on line 126 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected name distribution, expected := or = or comma

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.`,

Check failure on line 129 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected name copyright, expected semicolon or newline
caseSensitive: false,
expectedValid: false,
expectedError: nil,
Expand Down Expand Up @@ -179,13 +170,11 @@
},
{
description: "Valid copyright statement should pass",
fileContents: "Copyright (c) 2022 HashiCorp, Inc.",
expectedValid: true,
expectedError: nil,
},
{
description: "Valid copyright statement with language headers should pass",
fileContents: "#!/bin/bash\nCopyright (c) 2022 HashiCorp, Inc.",
expectedValid: true,
expectedError: nil,
},
Expand All @@ -197,7 +186,6 @@
},
{
description: "Malformed copyright statement without year should pass",
fileContents: "Copyright (c) HashiCorp, Inc.",
expectedValid: true,
expectedError: nil,
},
Expand Down Expand Up @@ -227,7 +215,6 @@
},
{
description: "valid copyright statement on document that has the copyright word elsewhere should pass",
fileContents: `Copyright (c) 2022 HashiCorp, Inc.

Apache License
Version 2.0, January 2004
Expand All @@ -244,7 +231,7 @@
the copyright owner that is granting the License.`,
expectedValid: true,
expectedError: nil,
},

Check failure on line 234 in licensecheck/copyright_test.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected comma at end of statement
{
description: "missing statement on document that has the copyright word elsewhere should fail",
fileContents: `Apache License
Expand Down
2 changes: 1 addition & 1 deletion licensecheck/licensecheck.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package licensecheck
Expand Down
2 changes: 1 addition & 1 deletion licensecheck/licensecheck_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package licensecheck
Expand Down
2 changes: 1 addition & 1 deletion licensecheck/licensetext.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package licensecheck
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package main
Expand Down
2 changes: 1 addition & 1 deletion repodata/repodata.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package repodata
Expand Down
2 changes: 1 addition & 1 deletion repodata/repodata_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) HashiCorp, Inc.
// Copyright IBM Corp. 2023, 2025
// SPDX-License-Identifier: MPL-2.0

package repodata
Expand Down
Loading