diff --git a/.copywrite.hcl b/.copywrite.hcl new file mode 100644 index 00000000..35eae082 --- /dev/null +++ b/.copywrite.hcl @@ -0,0 +1,16 @@ +schema_version = 1 + +project { + license = "MPL-2.0" + copyright_year = 2014 + + # (OPTIONAL) A list of globs that should not have copyright/license headers. + # Supports doublestar glob patterns for more flexibility in defining which + # files or folders should be ignored + header_ignore = [ + "hclsyntax/fuzz/testdata/**", + "hclwrite/fuzz/testdata/**", + "json/fuzz/testdata/**", + "specsuite/tests/**", + ] +} diff --git a/cmd/hcldec/diags_json.go b/cmd/hcldec/diags_json.go index f0b4a40a..f5939b9e 100644 --- a/cmd/hcldec/diags_json.go +++ b/cmd/hcldec/diags_json.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hcldec/examples/sh-config-file/example.sh b/cmd/hcldec/examples/sh-config-file/example.sh index 95a00805..4544c268 100755 --- a/cmd/hcldec/examples/sh-config-file/example.sh +++ b/cmd/hcldec/examples/sh-config-file/example.sh @@ -1,4 +1,7 @@ #!/bin/bash +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + set -euo pipefail diff --git a/cmd/hcldec/main.go b/cmd/hcldec/main.go index 5be672dd..1ddc8006 100644 --- a/cmd/hcldec/main.go +++ b/cmd/hcldec/main.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hcldec/spec.go b/cmd/hcldec/spec.go index b592cf9d..a011d1c9 100644 --- a/cmd/hcldec/spec.go +++ b/cmd/hcldec/spec.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hcldec/spec_funcs.go b/cmd/hcldec/spec_funcs.go index 99c8ea6a..f7bdaf08 100644 --- a/cmd/hcldec/spec_funcs.go +++ b/cmd/hcldec/spec_funcs.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hcldec/type_expr.go b/cmd/hcldec/type_expr.go index 3e36420d..ed838d70 100644 --- a/cmd/hcldec/type_expr.go +++ b/cmd/hcldec/type_expr.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hcldec/vars.go b/cmd/hcldec/vars.go index d3971cbc..cf70136d 100644 --- a/cmd/hcldec/vars.go +++ b/cmd/hcldec/vars.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hclfmt/main.go b/cmd/hclfmt/main.go index 41901cf6..aff04270 100644 --- a/cmd/hclfmt/main.go +++ b/cmd/hclfmt/main.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hclspecsuite/diagnostics.go b/cmd/hclspecsuite/diagnostics.go index 129fdd21..97eb1df7 100644 --- a/cmd/hclspecsuite/diagnostics.go +++ b/cmd/hclspecsuite/diagnostics.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hclspecsuite/log.go b/cmd/hclspecsuite/log.go index 022c7be2..b31937b2 100644 --- a/cmd/hclspecsuite/log.go +++ b/cmd/hclspecsuite/log.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hclspecsuite/main.go b/cmd/hclspecsuite/main.go index 384ee02f..9f4ee604 100644 --- a/cmd/hclspecsuite/main.go +++ b/cmd/hclspecsuite/main.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hclspecsuite/runner.go b/cmd/hclspecsuite/runner.go index db9b13f8..11efa071 100644 --- a/cmd/hclspecsuite/runner.go +++ b/cmd/hclspecsuite/runner.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hclspecsuite/test_file.go b/cmd/hclspecsuite/test_file.go index 57ed35ee..95649d0f 100644 --- a/cmd/hclspecsuite/test_file.go +++ b/cmd/hclspecsuite/test_file.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/cmd/hclspecsuite/traversals.go b/cmd/hclspecsuite/traversals.go index d689390c..8a8a9443 100644 --- a/cmd/hclspecsuite/traversals.go +++ b/cmd/hclspecsuite/traversals.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package main import ( diff --git a/diagnostic.go b/diagnostic.go index bcf4eb39..578f81a2 100644 --- a/diagnostic.go +++ b/diagnostic.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/diagnostic_text.go b/diagnostic_text.go index 0b4a2629..bdfad42b 100644 --- a/diagnostic_text.go +++ b/diagnostic_text.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/diagnostic_text_test.go b/diagnostic_text_test.go index 8757fbe6..1057998a 100644 --- a/diagnostic_text_test.go +++ b/diagnostic_text_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/diagnostic_typeparams.go b/diagnostic_typeparams.go index 6994e233..92be8f1a 100644 --- a/diagnostic_typeparams.go +++ b/diagnostic_typeparams.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build go1.18 // +build go1.18 diff --git a/didyoumean.go b/didyoumean.go index c1283344..fd00ca6f 100644 --- a/didyoumean.go +++ b/didyoumean.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/doc.go b/doc.go index 0d43fb2c..a0e3119f 100644 --- a/doc.go +++ b/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package hcl contains the main modelling types and general utility functions // for HCL. // diff --git a/eval_context.go b/eval_context.go index 915910ad..921cfcb4 100644 --- a/eval_context.go +++ b/eval_context.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/expr_call.go b/expr_call.go index 6963fbae..ca59b90d 100644 --- a/expr_call.go +++ b/expr_call.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl // ExprCall tests if the given expression is a function call and, diff --git a/expr_list.go b/expr_list.go index d05cca0b..8c0cf405 100644 --- a/expr_list.go +++ b/expr_list.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl // ExprList tests if the given expression is a static list construct and, diff --git a/expr_map.go b/expr_map.go index 96d1ce4b..56cf9747 100644 --- a/expr_map.go +++ b/expr_map.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl // ExprMap tests if the given expression is a static map construct and, diff --git a/expr_unwrap.go b/expr_unwrap.go index 6d5d205c..6683fd54 100644 --- a/expr_unwrap.go +++ b/expr_unwrap.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl type unwrapExpression interface { diff --git a/ext/customdecode/customdecode.go b/ext/customdecode/customdecode.go index c9d7a1ef..e0dda0df 100644 --- a/ext/customdecode/customdecode.go +++ b/ext/customdecode/customdecode.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package customdecode contains a HCL extension that allows, in certain // contexts, expression evaluation to be overridden by custom static analysis. // diff --git a/ext/customdecode/expression_type.go b/ext/customdecode/expression_type.go index af7c66c2..2477f219 100644 --- a/ext/customdecode/expression_type.go +++ b/ext/customdecode/expression_type.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package customdecode import ( diff --git a/ext/dynblock/expand_body.go b/ext/dynblock/expand_body.go index 0b68a7ae..0d870842 100644 --- a/ext/dynblock/expand_body.go +++ b/ext/dynblock/expand_body.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package dynblock import ( diff --git a/ext/dynblock/expand_body_test.go b/ext/dynblock/expand_body_test.go index a6544526..ccc4d303 100644 --- a/ext/dynblock/expand_body_test.go +++ b/ext/dynblock/expand_body_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package dynblock import ( diff --git a/ext/dynblock/expand_spec.go b/ext/dynblock/expand_spec.go index 98a51ead..23295d33 100644 --- a/ext/dynblock/expand_spec.go +++ b/ext/dynblock/expand_spec.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package dynblock import ( diff --git a/ext/dynblock/expr_wrap.go b/ext/dynblock/expr_wrap.go index 460a1d2a..625bf9cc 100644 --- a/ext/dynblock/expr_wrap.go +++ b/ext/dynblock/expr_wrap.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package dynblock import ( diff --git a/ext/dynblock/iteration.go b/ext/dynblock/iteration.go index c5663886..9e811a48 100644 --- a/ext/dynblock/iteration.go +++ b/ext/dynblock/iteration.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package dynblock import ( diff --git a/ext/dynblock/public.go b/ext/dynblock/public.go index a5bfd94e..abee67c4 100644 --- a/ext/dynblock/public.go +++ b/ext/dynblock/public.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package dynblock provides an extension to HCL that allows dynamic // declaration of nested blocks in certain contexts via a special block type // named "dynamic". diff --git a/ext/dynblock/schema.go b/ext/dynblock/schema.go index b3907d6e..026008bd 100644 --- a/ext/dynblock/schema.go +++ b/ext/dynblock/schema.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package dynblock import "github.com/hashicorp/hcl/v2" diff --git a/ext/dynblock/unknown_body.go b/ext/dynblock/unknown_body.go index caa20853..6cd59c77 100644 --- a/ext/dynblock/unknown_body.go +++ b/ext/dynblock/unknown_body.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package dynblock import ( diff --git a/ext/dynblock/variables.go b/ext/dynblock/variables.go index 19233929..1eb1f1e8 100644 --- a/ext/dynblock/variables.go +++ b/ext/dynblock/variables.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package dynblock import ( diff --git a/ext/dynblock/variables_hcldec.go b/ext/dynblock/variables_hcldec.go index 907ef3eb..caaf9df4 100644 --- a/ext/dynblock/variables_hcldec.go +++ b/ext/dynblock/variables_hcldec.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package dynblock import ( diff --git a/ext/dynblock/variables_test.go b/ext/dynblock/variables_test.go index b3a2d721..ee8adaa9 100644 --- a/ext/dynblock/variables_test.go +++ b/ext/dynblock/variables_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package dynblock import ( diff --git a/ext/transform/doc.go b/ext/transform/doc.go index ac466698..6744467a 100644 --- a/ext/transform/doc.go +++ b/ext/transform/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package transform is a helper package for writing extensions that work // by applying transforms to bodies. // diff --git a/ext/transform/error.go b/ext/transform/error.go index 6063e2bc..38e064b8 100644 --- a/ext/transform/error.go +++ b/ext/transform/error.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package transform import ( diff --git a/ext/transform/transform.go b/ext/transform/transform.go index f0f5ff69..035044e4 100644 --- a/ext/transform/transform.go +++ b/ext/transform/transform.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package transform import ( diff --git a/ext/transform/transform_test.go b/ext/transform/transform_test.go index 7b68aca3..5d4b6667 100644 --- a/ext/transform/transform_test.go +++ b/ext/transform/transform_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package transform import ( diff --git a/ext/transform/transformer.go b/ext/transform/transformer.go index 2599cdd4..511d0a29 100644 --- a/ext/transform/transformer.go +++ b/ext/transform/transformer.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package transform import ( diff --git a/ext/tryfunc/tryfunc.go b/ext/tryfunc/tryfunc.go index 2f4862f4..47789858 100644 --- a/ext/tryfunc/tryfunc.go +++ b/ext/tryfunc/tryfunc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package tryfunc contains some optional functions that can be exposed in // HCL-based languages to allow authors to test whether a particular expression // can succeed and take dynamic action based on that result. diff --git a/ext/tryfunc/tryfunc_test.go b/ext/tryfunc/tryfunc_test.go index dc32a6de..1e75a163 100644 --- a/ext/tryfunc/tryfunc_test.go +++ b/ext/tryfunc/tryfunc_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package tryfunc import ( diff --git a/ext/typeexpr/defaults.go b/ext/typeexpr/defaults.go index f2962139..7e09e54e 100644 --- a/ext/typeexpr/defaults.go +++ b/ext/typeexpr/defaults.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package typeexpr import ( diff --git a/ext/typeexpr/defaults_test.go b/ext/typeexpr/defaults_test.go index 49f151b4..fcfd2924 100644 --- a/ext/typeexpr/defaults_test.go +++ b/ext/typeexpr/defaults_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package typeexpr import ( diff --git a/ext/typeexpr/doc.go b/ext/typeexpr/doc.go index c4b37957..9c5ab6e2 100644 --- a/ext/typeexpr/doc.go +++ b/ext/typeexpr/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package typeexpr extends HCL with a convention for describing HCL types // within configuration files. // diff --git a/ext/typeexpr/get_type.go b/ext/typeexpr/get_type.go index 890cf8ed..64e3995a 100644 --- a/ext/typeexpr/get_type.go +++ b/ext/typeexpr/get_type.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package typeexpr import ( diff --git a/ext/typeexpr/get_type_test.go b/ext/typeexpr/get_type_test.go index d349d72a..7976bb87 100644 --- a/ext/typeexpr/get_type_test.go +++ b/ext/typeexpr/get_type_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package typeexpr import ( diff --git a/ext/typeexpr/public.go b/ext/typeexpr/public.go index f2e187ef..e03631d3 100644 --- a/ext/typeexpr/public.go +++ b/ext/typeexpr/public.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package typeexpr import ( diff --git a/ext/typeexpr/type_string_test.go b/ext/typeexpr/type_string_test.go index fbdf3f48..d9a52404 100644 --- a/ext/typeexpr/type_string_test.go +++ b/ext/typeexpr/type_string_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package typeexpr import ( diff --git a/ext/typeexpr/type_type.go b/ext/typeexpr/type_type.go index 5462d82c..3ca0ba43 100644 --- a/ext/typeexpr/type_type.go +++ b/ext/typeexpr/type_type.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package typeexpr import ( diff --git a/ext/typeexpr/type_type_test.go b/ext/typeexpr/type_type_test.go index 2286a2e1..328ead6d 100644 --- a/ext/typeexpr/type_type_test.go +++ b/ext/typeexpr/type_type_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package typeexpr import ( diff --git a/ext/userfunc/decode.go b/ext/userfunc/decode.go index 6c1e4ca4..3f3c533e 100644 --- a/ext/userfunc/decode.go +++ b/ext/userfunc/decode.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package userfunc import ( diff --git a/ext/userfunc/decode_test.go b/ext/userfunc/decode_test.go index 633c6d8c..60841b21 100644 --- a/ext/userfunc/decode_test.go +++ b/ext/userfunc/decode_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package userfunc import ( diff --git a/ext/userfunc/doc.go b/ext/userfunc/doc.go index e4461d45..4134e807 100644 --- a/ext/userfunc/doc.go +++ b/ext/userfunc/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package userfunc implements a HCL extension that allows user-defined // functions in HCL configuration. // diff --git a/ext/userfunc/public.go b/ext/userfunc/public.go index 5415c8c9..8e6c9bfb 100644 --- a/ext/userfunc/public.go +++ b/ext/userfunc/public.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package userfunc import ( diff --git a/gohcl/decode.go b/gohcl/decode.go index 2954f4ce..2d1776a3 100644 --- a/gohcl/decode.go +++ b/gohcl/decode.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package gohcl import ( diff --git a/gohcl/decode_test.go b/gohcl/decode_test.go index 50eaea7f..1ac5d049 100644 --- a/gohcl/decode_test.go +++ b/gohcl/decode_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package gohcl import ( diff --git a/gohcl/doc.go b/gohcl/doc.go index 9dcd970b..cfec2530 100644 --- a/gohcl/doc.go +++ b/gohcl/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package gohcl allows decoding HCL configurations into Go data structures. // // It provides a convenient and concise way of describing the schema for diff --git a/gohcl/encode.go b/gohcl/encode.go index d612e09c..64cb2d1e 100644 --- a/gohcl/encode.go +++ b/gohcl/encode.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package gohcl import ( diff --git a/gohcl/encode_test.go b/gohcl/encode_test.go index 9778df7f..a75bf28b 100644 --- a/gohcl/encode_test.go +++ b/gohcl/encode_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package gohcl_test import ( diff --git a/gohcl/schema.go b/gohcl/schema.go index df21cc49..0cdca271 100644 --- a/gohcl/schema.go +++ b/gohcl/schema.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package gohcl import ( diff --git a/gohcl/schema_test.go b/gohcl/schema_test.go index cea77ca9..ca8c0ec1 100644 --- a/gohcl/schema_test.go +++ b/gohcl/schema_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package gohcl import ( diff --git a/gohcl/types.go b/gohcl/types.go index a8d00f8f..302e454c 100644 --- a/gohcl/types.go +++ b/gohcl/types.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package gohcl import ( diff --git a/hcldec/block_labels.go b/hcldec/block_labels.go index 71de4519..9e6f1f2c 100644 --- a/hcldec/block_labels.go +++ b/hcldec/block_labels.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcldec import ( diff --git a/hcldec/decode.go b/hcldec/decode.go index c6e42236..5f86e67f 100644 --- a/hcldec/decode.go +++ b/hcldec/decode.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcldec import ( diff --git a/hcldec/doc.go b/hcldec/doc.go index 23bfe542..c8439401 100644 --- a/hcldec/doc.go +++ b/hcldec/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package hcldec provides a higher-level API for unpacking the content of // HCL bodies, implemented in terms of the low-level "Content" API exposed // by the bodies themselves. diff --git a/hcldec/gob.go b/hcldec/gob.go index e2027cfd..27e9be2e 100644 --- a/hcldec/gob.go +++ b/hcldec/gob.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcldec import ( diff --git a/hcldec/public.go b/hcldec/public.go index 1fa548d0..ff1e5fe9 100644 --- a/hcldec/public.go +++ b/hcldec/public.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcldec import ( diff --git a/hcldec/public_test.go b/hcldec/public_test.go index 20521fbe..edd0c534 100644 --- a/hcldec/public_test.go +++ b/hcldec/public_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcldec import ( diff --git a/hcldec/schema.go b/hcldec/schema.go index ddbe7fa4..8a9fa4fe 100644 --- a/hcldec/schema.go +++ b/hcldec/schema.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcldec import ( diff --git a/hcldec/spec.go b/hcldec/spec.go index 42cb070d..b31ec175 100644 --- a/hcldec/spec.go +++ b/hcldec/spec.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcldec import ( diff --git a/hcldec/spec_test.go b/hcldec/spec_test.go index 61d60c98..d59b6050 100644 --- a/hcldec/spec_test.go +++ b/hcldec/spec_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcldec import ( diff --git a/hcldec/variables.go b/hcldec/variables.go index f8440eb6..c5ac1744 100644 --- a/hcldec/variables.go +++ b/hcldec/variables.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcldec import ( diff --git a/hcldec/variables_test.go b/hcldec/variables_test.go index 53bb99d1..10412deb 100644 --- a/hcldec/variables_test.go +++ b/hcldec/variables_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcldec import ( diff --git a/hcled/doc.go b/hcled/doc.go index 1a801448..51b335a1 100644 --- a/hcled/doc.go +++ b/hcled/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package hcled provides functionality intended to help an application // that embeds HCL to deliver relevant information to a text editor or IDE // for navigating around and analyzing configuration files. diff --git a/hcled/navigation.go b/hcled/navigation.go index 050ad758..85935696 100644 --- a/hcled/navigation.go +++ b/hcled/navigation.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcled import ( diff --git a/hclparse/parser.go b/hclparse/parser.go index 1dc2eccd..c9b843d0 100644 --- a/hclparse/parser.go +++ b/hclparse/parser.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package hclparse has the main API entry point for parsing both HCL native // syntax and HCL JSON. // diff --git a/hclsimple/hclsimple.go b/hclsimple/hclsimple.go index 09bc4f7f..a3ba45c2 100644 --- a/hclsimple/hclsimple.go +++ b/hclsimple/hclsimple.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package hclsimple is a higher-level entry point for loading HCL // configuration files directly into Go struct values in a single step. // diff --git a/hclsimple/hclsimple_test.go b/hclsimple/hclsimple_test.go index b395804e..034edd53 100644 --- a/hclsimple/hclsimple_test.go +++ b/hclsimple/hclsimple_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsimple_test import ( diff --git a/hclsimple/testdata/test.hcl b/hclsimple/testdata/test.hcl index 4383b2f8..ee536036 100644 --- a/hclsimple/testdata/test.hcl +++ b/hclsimple/testdata/test.hcl @@ -1,2 +1,5 @@ +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + foo = "bar" baz = "boop" diff --git a/hclsyntax/diagnostics.go b/hclsyntax/diagnostics.go index 8c20286b..43689d74 100644 --- a/hclsyntax/diagnostics.go +++ b/hclsyntax/diagnostics.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/didyoumean.go b/hclsyntax/didyoumean.go index ccc1c0ae..5b0e4681 100644 --- a/hclsyntax/didyoumean.go +++ b/hclsyntax/didyoumean.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/didyoumean_test.go b/hclsyntax/didyoumean_test.go index 9d04b7b7..84cfed6d 100644 --- a/hclsyntax/didyoumean_test.go +++ b/hclsyntax/didyoumean_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import "testing" diff --git a/hclsyntax/doc.go b/hclsyntax/doc.go index 617bc29d..defe3dbb 100644 --- a/hclsyntax/doc.go +++ b/hclsyntax/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package hclsyntax contains the parser, AST, etc for HCL's native language, // as opposed to the JSON variant. // diff --git a/hclsyntax/expression.go b/hclsyntax/expression.go index 358fd5d5..55fecd4e 100644 --- a/hclsyntax/expression.go +++ b/hclsyntax/expression.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/expression_ops.go b/hclsyntax/expression_ops.go index c1db0cec..6585612c 100644 --- a/hclsyntax/expression_ops.go +++ b/hclsyntax/expression_ops.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/expression_static_test.go b/hclsyntax/expression_static_test.go index 3aeadec4..9b23b727 100644 --- a/hclsyntax/expression_static_test.go +++ b/hclsyntax/expression_static_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/expression_template.go b/hclsyntax/expression_template.go index c3f96943..0b5ac195 100644 --- a/hclsyntax/expression_template.go +++ b/hclsyntax/expression_template.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/expression_template_test.go b/hclsyntax/expression_template_test.go index e67d71d3..624a2cd0 100644 --- a/hclsyntax/expression_template_test.go +++ b/hclsyntax/expression_template_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/expression_test.go b/hclsyntax/expression_test.go index 05db38d4..df1e1939 100644 --- a/hclsyntax/expression_test.go +++ b/hclsyntax/expression_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/expression_typeparams_test.go b/hclsyntax/expression_typeparams_test.go index f88e6a34..4ee9a77e 100644 --- a/hclsyntax/expression_typeparams_test.go +++ b/hclsyntax/expression_typeparams_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //go:build go1.18 // +build go1.18 diff --git a/hclsyntax/expression_vars.go b/hclsyntax/expression_vars.go index a82bf790..ce5a5cb7 100755 --- a/hclsyntax/expression_vars.go +++ b/hclsyntax/expression_vars.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax // Generated by expression_vars_get.go. DO NOT EDIT. diff --git a/hclsyntax/expression_vars_gen.go b/hclsyntax/expression_vars_gen.go index 7b7572cc..6ab79276 100644 --- a/hclsyntax/expression_vars_gen.go +++ b/hclsyntax/expression_vars_gen.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // This is a 'go generate'-oriented program for producing the "Variables" // method on every Expression implementation found within this package. // All expressions share the same implementation for this method, which diff --git a/hclsyntax/file.go b/hclsyntax/file.go index f55e9ce2..7be626ff 100644 --- a/hclsyntax/file.go +++ b/hclsyntax/file.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/fuzz/fuzz_test.go b/hclsyntax/fuzz/fuzz_test.go index 4f0d1534..4aaee5d0 100644 --- a/hclsyntax/fuzz/fuzz_test.go +++ b/hclsyntax/fuzz/fuzz_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package fuzzhclsyntax import ( diff --git a/hclsyntax/generate.go b/hclsyntax/generate.go index 841656a6..383ec6b8 100644 --- a/hclsyntax/generate.go +++ b/hclsyntax/generate.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax //go:generate go run expression_vars_gen.go diff --git a/hclsyntax/keywords.go b/hclsyntax/keywords.go index eef8b962..5124ae95 100644 --- a/hclsyntax/keywords.go +++ b/hclsyntax/keywords.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/navigation.go b/hclsyntax/navigation.go index af98ef04..83e1d4ef 100644 --- a/hclsyntax/navigation.go +++ b/hclsyntax/navigation.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/navigation_test.go b/hclsyntax/navigation_test.go index 221f1b49..12187398 100644 --- a/hclsyntax/navigation_test.go +++ b/hclsyntax/navigation_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/node.go b/hclsyntax/node.go index 41b35e53..6ead6091 100644 --- a/hclsyntax/node.go +++ b/hclsyntax/node.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/parse_traversal_test.go b/hclsyntax/parse_traversal_test.go index 329fe58e..3ca5fc2b 100644 --- a/hclsyntax/parse_traversal_test.go +++ b/hclsyntax/parse_traversal_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/parser.go b/hclsyntax/parser.go index 109c1c81..6ed88e63 100644 --- a/hclsyntax/parser.go +++ b/hclsyntax/parser.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/parser_template.go b/hclsyntax/parser_template.go index 7cf262a0..3ac68298 100644 --- a/hclsyntax/parser_template.go +++ b/hclsyntax/parser_template.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/parser_test.go b/hclsyntax/parser_test.go index 7e2484a1..69636c9f 100644 --- a/hclsyntax/parser_test.go +++ b/hclsyntax/parser_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/parser_traversal.go b/hclsyntax/parser_traversal.go index 7dcb0fd3..3afa6ab0 100644 --- a/hclsyntax/parser_traversal.go +++ b/hclsyntax/parser_traversal.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/peeker.go b/hclsyntax/peeker.go index f056f906..74fa3fb3 100644 --- a/hclsyntax/peeker.go +++ b/hclsyntax/peeker.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/peeker_test.go b/hclsyntax/peeker_test.go index 626d77b3..cce3266d 100644 --- a/hclsyntax/peeker_test.go +++ b/hclsyntax/peeker_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/public.go b/hclsyntax/public.go index 0b68efd6..d56f8e50 100644 --- a/hclsyntax/public.go +++ b/hclsyntax/public.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/public_test.go b/hclsyntax/public_test.go index 596b1a26..6cdd3b17 100644 --- a/hclsyntax/public_test.go +++ b/hclsyntax/public_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/scan_string_lit.go b/hclsyntax/scan_string_lit.go index 2895ade7..5d60ff5a 100644 --- a/hclsyntax/scan_string_lit.go +++ b/hclsyntax/scan_string_lit.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //line scan_string_lit.rl:1 package hclsyntax diff --git a/hclsyntax/scan_string_lit_test.go b/hclsyntax/scan_string_lit_test.go index c1b8cd36..bebad0ee 100644 --- a/hclsyntax/scan_string_lit_test.go +++ b/hclsyntax/scan_string_lit_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/scan_tokens.go b/hclsyntax/scan_tokens.go index 794123a8..1bbbb927 100644 --- a/hclsyntax/scan_tokens.go +++ b/hclsyntax/scan_tokens.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + //line scan_tokens.rl:1 package hclsyntax diff --git a/hclsyntax/scan_tokens_test.go b/hclsyntax/scan_tokens_test.go index c4537385..f3b6eeb4 100644 --- a/hclsyntax/scan_tokens_test.go +++ b/hclsyntax/scan_tokens_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/structure.go b/hclsyntax/structure.go index f42ae918..ff272631 100644 --- a/hclsyntax/structure.go +++ b/hclsyntax/structure.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/structure_at_pos.go b/hclsyntax/structure_at_pos.go index 587844ac..50857168 100644 --- a/hclsyntax/structure_at_pos.go +++ b/hclsyntax/structure_at_pos.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/structure_at_pos_test.go b/hclsyntax/structure_at_pos_test.go index ead77bfb..052a938a 100644 --- a/hclsyntax/structure_at_pos_test.go +++ b/hclsyntax/structure_at_pos_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/structure_test.go b/hclsyntax/structure_test.go index ec1ff6df..c86dc328 100644 --- a/hclsyntax/structure_test.go +++ b/hclsyntax/structure_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/token.go b/hclsyntax/token.go index 5ef093f9..a14b3940 100644 --- a/hclsyntax/token.go +++ b/hclsyntax/token.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/token_test.go b/hclsyntax/token_test.go index a954d603..2ce05479 100644 --- a/hclsyntax/token_test.go +++ b/hclsyntax/token_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/unicode2ragel.rb b/hclsyntax/unicode2ragel.rb index 422e4e5c..235265de 100644 --- a/hclsyntax/unicode2ragel.rb +++ b/hclsyntax/unicode2ragel.rb @@ -1,4 +1,7 @@ #!/usr/bin/env ruby +# Copyright (c) HashiCorp, Inc. +# SPDX-License-Identifier: MPL-2.0 + # # This scripted has been updated to accept more command-line arguments: # diff --git a/hclsyntax/variables.go b/hclsyntax/variables.go index 3d68c413..b4be9269 100644 --- a/hclsyntax/variables.go +++ b/hclsyntax/variables.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/variables_test.go b/hclsyntax/variables_test.go index 8c22ede2..c841d94a 100644 --- a/hclsyntax/variables_test.go +++ b/hclsyntax/variables_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/walk.go b/hclsyntax/walk.go index 89bfe676..82b6f9b0 100644 --- a/hclsyntax/walk.go +++ b/hclsyntax/walk.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hclsyntax/walk_test.go b/hclsyntax/walk_test.go index 9200199a..5ac0ca88 100644 --- a/hclsyntax/walk_test.go +++ b/hclsyntax/walk_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclsyntax import ( diff --git a/hcltest/doc.go b/hcltest/doc.go index 3abad003..d450a2b9 100644 --- a/hcltest/doc.go +++ b/hcltest/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package hcltest contains utilities that aim to make it more convenient // to write tests for code that interacts with the HCL API. // diff --git a/hcltest/mock.go b/hcltest/mock.go index 5f5e82cb..9df3e8d1 100644 --- a/hcltest/mock.go +++ b/hcltest/mock.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcltest import ( diff --git a/hcltest/mock_test.go b/hcltest/mock_test.go index 5b01d022..eb0e6db1 100644 --- a/hcltest/mock_test.go +++ b/hcltest/mock_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcltest import ( diff --git a/hclwrite/ast.go b/hclwrite/ast.go index 09041652..d2f9daec 100644 --- a/hclwrite/ast.go +++ b/hclwrite/ast.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/ast_attribute.go b/hclwrite/ast_attribute.go index 609419ff..3edc68c0 100644 --- a/hclwrite/ast_attribute.go +++ b/hclwrite/ast_attribute.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/ast_block.go b/hclwrite/ast_block.go index edabb26a..91e7d4a3 100644 --- a/hclwrite/ast_block.go +++ b/hclwrite/ast_block.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/ast_block_test.go b/hclwrite/ast_block_test.go index 81290404..0760001a 100644 --- a/hclwrite/ast_block_test.go +++ b/hclwrite/ast_block_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/ast_body.go b/hclwrite/ast_body.go index 119f53e6..6321509a 100644 --- a/hclwrite/ast_body.go +++ b/hclwrite/ast_body.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/ast_body_test.go b/hclwrite/ast_body_test.go index 53367861..1e235234 100644 --- a/hclwrite/ast_body_test.go +++ b/hclwrite/ast_body_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/ast_expression.go b/hclwrite/ast_expression.go index 073c3087..77b9f780 100644 --- a/hclwrite/ast_expression.go +++ b/hclwrite/ast_expression.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/ast_test.go b/hclwrite/ast_test.go index 08f7801f..12bb0546 100644 --- a/hclwrite/ast_test.go +++ b/hclwrite/ast_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/doc.go b/hclwrite/doc.go index 56d5b775..57ec37ea 100644 --- a/hclwrite/doc.go +++ b/hclwrite/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package hclwrite deals with the problem of generating HCL configuration // and of making specific surgical changes to existing HCL configurations. // diff --git a/hclwrite/examples_test.go b/hclwrite/examples_test.go index f848ce29..f61d7827 100644 --- a/hclwrite/examples_test.go +++ b/hclwrite/examples_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite_test import ( diff --git a/hclwrite/format.go b/hclwrite/format.go index dca247ee..d5f974c3 100644 --- a/hclwrite/format.go +++ b/hclwrite/format.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/format_test.go b/hclwrite/format_test.go index 037157a9..e64b551f 100644 --- a/hclwrite/format_test.go +++ b/hclwrite/format_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/fuzz/fuzz_test.go b/hclwrite/fuzz/fuzz_test.go index fa29af93..573741c7 100644 --- a/hclwrite/fuzz/fuzz_test.go +++ b/hclwrite/fuzz/fuzz_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package fuzzhclwrite import ( diff --git a/hclwrite/generate.go b/hclwrite/generate.go index 6f6a2e63..678d5391 100644 --- a/hclwrite/generate.go +++ b/hclwrite/generate.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/generate_test.go b/hclwrite/generate_test.go index 06fa0944..87dffeca 100644 --- a/hclwrite/generate_test.go +++ b/hclwrite/generate_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/native_node_sorter.go b/hclwrite/native_node_sorter.go index cedf6862..0a78683b 100644 --- a/hclwrite/native_node_sorter.go +++ b/hclwrite/native_node_sorter.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/node.go b/hclwrite/node.go index d3a5b72c..7ad4bb91 100644 --- a/hclwrite/node.go +++ b/hclwrite/node.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/parser.go b/hclwrite/parser.go index 3df51447..53415aeb 100644 --- a/hclwrite/parser.go +++ b/hclwrite/parser.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/parser_test.go b/hclwrite/parser_test.go index 6edebc74..e557940e 100644 --- a/hclwrite/parser_test.go +++ b/hclwrite/parser_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/public.go b/hclwrite/public.go index 678a3aa4..8003a71d 100644 --- a/hclwrite/public.go +++ b/hclwrite/public.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/round_trip_test.go b/hclwrite/round_trip_test.go index 8ce9c4f7..bf306de5 100644 --- a/hclwrite/round_trip_test.go +++ b/hclwrite/round_trip_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/hclwrite/tokens.go b/hclwrite/tokens.go index 57a5fd2b..909bb4bb 100644 --- a/hclwrite/tokens.go +++ b/hclwrite/tokens.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hclwrite import ( diff --git a/integrationtest/convertfunc_test.go b/integrationtest/convertfunc_test.go index ffcb0efe..0dc2adde 100644 --- a/integrationtest/convertfunc_test.go +++ b/integrationtest/convertfunc_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package integrationtest import ( diff --git a/integrationtest/doc.go b/integrationtest/doc.go index 18f030c2..1a8146fe 100644 --- a/integrationtest/doc.go +++ b/integrationtest/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package integrationtest is an internal package that contains some // tests that attempt to exercise many HCL features together in realistic // scenarios. This is in addition to -- but not a substitute for -- unit tests diff --git a/integrationtest/hcldec_into_expr_test.go b/integrationtest/hcldec_into_expr_test.go index cd713dd3..9b00f3bd 100644 --- a/integrationtest/hcldec_into_expr_test.go +++ b/integrationtest/hcldec_into_expr_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package integrationtest import ( diff --git a/integrationtest/terraformlike_test.go b/integrationtest/terraformlike_test.go index b900c43f..89783462 100644 --- a/integrationtest/terraformlike_test.go +++ b/integrationtest/terraformlike_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package integrationtest import ( diff --git a/json/ast.go b/json/ast.go index 9c580ca3..3b385cce 100644 --- a/json/ast.go +++ b/json/ast.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/didyoumean.go b/json/didyoumean.go index fbdd8bff..dc004c4b 100644 --- a/json/didyoumean.go +++ b/json/didyoumean.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/didyoumean_test.go b/json/didyoumean_test.go index 999876ab..f189790b 100644 --- a/json/didyoumean_test.go +++ b/json/didyoumean_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import "testing" diff --git a/json/doc.go b/json/doc.go index 84d73193..bdc8f093 100644 --- a/json/doc.go +++ b/json/doc.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + // Package json is the JSON parser for HCL. It parses JSON files and returns // implementations of the core HCL structural interfaces in terms of the // JSON data inside. diff --git a/json/fuzz/fuzz_test.go b/json/fuzz/fuzz_test.go index f77c96ba..ccc21184 100644 --- a/json/fuzz/fuzz_test.go +++ b/json/fuzz/fuzz_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package fuzzjson import ( diff --git a/json/is.go b/json/is.go index 73c6775f..1d1a0b18 100644 --- a/json/is.go +++ b/json/is.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/navigation.go b/json/navigation.go index bc8a97f7..7aab1ec0 100644 --- a/json/navigation.go +++ b/json/navigation.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/navigation_test.go b/json/navigation_test.go index f8355e11..f22a9ff4 100644 --- a/json/navigation_test.go +++ b/json/navigation_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/parser.go b/json/parser.go index 6b7420b9..6b9bbf3e 100644 --- a/json/parser.go +++ b/json/parser.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/parser_test.go b/json/parser_test.go index dd0b373b..8f77630d 100644 --- a/json/parser_test.go +++ b/json/parser_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/peeker.go b/json/peeker.go index fc7bbf58..02efa5b2 100644 --- a/json/peeker.go +++ b/json/peeker.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json type peeker struct { diff --git a/json/public.go b/json/public.go index d1e4faf5..f36e52c8 100644 --- a/json/public.go +++ b/json/public.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/public_test.go b/json/public_test.go index 554b165a..6ecf40fa 100644 --- a/json/public_test.go +++ b/json/public_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/scanner.go b/json/scanner.go index b7111631..d15c1a33 100644 --- a/json/scanner.go +++ b/json/scanner.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/scanner_test.go b/json/scanner_test.go index eb4ea3ed..d59c201e 100644 --- a/json/scanner_test.go +++ b/json/scanner_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/structure.go b/json/structure.go index 76c9d739..3b7c425c 100644 --- a/json/structure.go +++ b/json/structure.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/json/structure_test.go b/json/structure_test.go index 4d53cbda..d05a1d68 100644 --- a/json/structure_test.go +++ b/json/structure_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package json import ( diff --git a/merged.go b/merged.go index 96e62a58..27fd1ed5 100644 --- a/merged.go +++ b/merged.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/merged_test.go b/merged_test.go index fdc5b087..598f2287 100644 --- a/merged_test.go +++ b/merged_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/ops.go b/ops.go index 47dc02ad..bdf23614 100644 --- a/ops.go +++ b/ops.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/ops_test.go b/ops_test.go index f627b1e3..7aabd7a2 100644 --- a/ops_test.go +++ b/ops_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/pos.go b/pos.go index 06db8bfb..1bbbce87 100644 --- a/pos.go +++ b/pos.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import "fmt" diff --git a/pos_scanner.go b/pos_scanner.go index 49077fc5..cff55392 100644 --- a/pos_scanner.go +++ b/pos_scanner.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/pos_scanner_test.go b/pos_scanner_test.go index b0dc902c..bb6a89a5 100644 --- a/pos_scanner_test.go +++ b/pos_scanner_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/pos_test.go b/pos_test.go index cfa41375..b90545b8 100644 --- a/pos_test.go +++ b/pos_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/schema.go b/schema.go index 891257ac..d4e339cb 100644 --- a/schema.go +++ b/schema.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl // BlockHeaderSchema represents the shape of a block header, and is diff --git a/specsuite/spec_test.go b/specsuite/spec_test.go index 46bf067e..36360a64 100644 --- a/specsuite/spec_test.go +++ b/specsuite/spec_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package spectests import ( diff --git a/static_expr.go b/static_expr.go index 98ada87b..e14d7f89 100644 --- a/static_expr.go +++ b/static_expr.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/structure.go b/structure.go index aab09457..2bdf579d 100644 --- a/structure.go +++ b/structure.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/structure_at_pos.go b/structure_at_pos.go index 8521814e..62aba139 100644 --- a/structure_at_pos.go +++ b/structure_at_pos.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl // ----------------------------------------------------------------------------- diff --git a/traversal.go b/traversal.go index d7101970..540dde7e 100644 --- a/traversal.go +++ b/traversal.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import ( diff --git a/traversal_for_expr.go b/traversal_for_expr.go index f69d5fe9..8ce00c6d 100644 --- a/traversal_for_expr.go +++ b/traversal_for_expr.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl // AbsTraversalForExpr attempts to interpret the given expression as diff --git a/traversal_for_expr_test.go b/traversal_for_expr_test.go index 9a9539f6..5bfcebf0 100644 --- a/traversal_for_expr_test.go +++ b/traversal_for_expr_test.go @@ -1,3 +1,6 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: MPL-2.0 + package hcl import (