Skip to content

Commit 2d150e6

Browse files
Allow adding copyright headers to non-templated files in downstream-selective way (#7937) (#5696)
* Add work-in-progress for adding copyright headers to non-templated files in downstream-selective way * Update quotation marks to address CI failure/linting issue * Update WIP to include better ignoring of files and folders * Address RuboCop linting * Address RuboCop linting * Address RuboCop linting - line length * Add ability to make comments for different file extensions * Skip adding headers to bash files, as headers are functional in .sh * Stop headers being added to tgc * Update logging messages and set level to debug, update comments * Address RuboCop linting * Address RuboCop linting * Add comment making link to .copywrite.hcl file explicit * Don't attempt to add a header when an unexpected file extension is encountered * Add info log about unexpected output folder This will help if a user suddenly sees copyright headers being removed unexpectedly * Include `add_hashicorp_copyright_header` in `copy_file_list` method * Add condition to run on Go files only, as that ensures doesn't run on folders * Remove handcoded HashiCorp copyright headers in handwritten/compiled files (revert GoogleCloudPlatform/magic-modules#8012) * Fix HashiCorp copyright header content * Fix how `version.go` is copied, to allow copyright header to be added * Add tests for `expected_output_folder?` Ruby method * Add copyright to test file, update test names and handle line length linting Signed-off-by: Modular Magician <[email protected]>
1 parent e064d23 commit 2d150e6

File tree

975 files changed

+1697
-127
lines changed

Some content is hidden

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

975 files changed

+1697
-127
lines changed

.changelog/7937.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/acctest/gcp_sweeper.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) HashiCorp, Inc.
22
// SPDX-License-Identifier: MPL-2.0
3-
43
package acctest
54

65
import (

google-beta/acctest/provider_test_utils.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) HashiCorp, Inc.
22
// SPDX-License-Identifier: MPL-2.0
3-
43
package acctest
54

65
import (

google-beta/acctest/test_utils.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) HashiCorp, Inc.
22
// SPDX-License-Identifier: MPL-2.0
3-
43
package acctest
54

65
import (

google-beta/acctest/vcr_utils.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// Copyright (c) HashiCorp, Inc.
22
// SPDX-License-Identifier: MPL-2.0
3-
43
package acctest
54

65
import "os"

google-beta/appengine_operation.go

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

35
import (

google-beta/bootstrap_iam_test_utils.go

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

35
import (

google-beta/bootstrap_test_utils.go

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

35
import (

google-beta/cloud_identity_group_membership_utils.go

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

35
import (

google-beta/cloudfunctions_operation.go

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

35
import (

0 commit comments

Comments
 (0)