Skip to content

Commit

Permalink
Change address to HewlettPackard and add copyright (#22)
Browse files Browse the repository at this point in the history
Adds copyright notices to all .tf and .go files.
  • Loading branch information
AislingHPE authored Jun 19, 2024
1 parent bd3d0c7 commit 761e789
Show file tree
Hide file tree
Showing 26 changed files with 41 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ linters-settings:
lll:
line-length: 128
goimports:
local-prefixes: "github.com/AislingHPE"
local-prefixes: "github.com/HewlettPackard"
godox:
keywords:
- OPTIMIZE
Expand Down Expand Up @@ -43,7 +43,6 @@ linters:
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exportloopref
- funlen
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP

.PHONY: test
test:
go test ./...
Expand Down
3 changes: 2 additions & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package cmd

import (
Expand All @@ -8,7 +9,7 @@ import (

"github.com/spf13/cobra"

"github.com/AislingHPE/terraschema/pkg/jsonschema"
"github.com/HewlettPackard/terraschema/pkg/jsonschema"
)

// wanted behaviour:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/AislingHPE/terraschema
module github.com/HewlettPackard/terraschema

go 1.21.6

Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package main

import (
"fmt"
"os"

"github.com/AislingHPE/terraschema/cmd"
"github.com/HewlettPackard/terraschema/cmd"
)

func main() {
Expand Down
5 changes: 3 additions & 2 deletions pkg/jsonschema/json-schema.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package jsonschema

import (
"errors"
"fmt"
"slices"

"github.com/AislingHPE/terraschema/pkg/model"
"github.com/AislingHPE/terraschema/pkg/reader"
"github.com/HewlettPackard/terraschema/pkg/model"
"github.com/HewlettPackard/terraschema/pkg/reader"
)

func CreateSchema(path string, strict bool) (map[string]any, error) {
Expand Down
1 change: 1 addition & 0 deletions pkg/jsonschema/json-schema_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package jsonschema

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/jsonschema/type.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package jsonschema

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/jsonschema/validation.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package jsonschema

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/jsonschema/validation_util.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package jsonschema

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/jsonschema/value.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package jsonschema

import (
Expand Down
3 changes: 2 additions & 1 deletion pkg/jsonschema/value_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package jsonschema

import (
Expand All @@ -10,7 +11,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/require"

"github.com/AislingHPE/terraschema/pkg/reader"
"github.com/HewlettPackard/terraschema/pkg/reader"
)

func TestExpressionToJSONObject_Default(t *testing.T) {
Expand Down
1 change: 1 addition & 0 deletions pkg/model/model.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package model

import (
Expand Down
3 changes: 2 additions & 1 deletion pkg/reader/reader.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package reader

import (
Expand All @@ -8,7 +9,7 @@ import (
"github.com/hashicorp/hcl/v2/gohcl"
"github.com/hashicorp/hcl/v2/hclparse"

"github.com/AislingHPE/terraschema/pkg/model"
"github.com/HewlettPackard/terraschema/pkg/model"
)

var fileSchema = &hcl.BodySchema{
Expand Down
1 change: 1 addition & 0 deletions pkg/reader/reader_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package reader

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/reader/type-constraint_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package reader

import (
Expand Down
1 change: 1 addition & 0 deletions pkg/reader/type-contraint.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// (C) Copyright 2024 Hewlett Packard Enterprise Development LP
package reader

import (
Expand Down
2 changes: 2 additions & 0 deletions test/modules/complex-types/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP

variable "an_object_with_optional" {
type = object({
a = string
Expand Down
2 changes: 2 additions & 0 deletions test/modules/custom-validation/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP

variable "a_string_enum_kind_1" {
type = string
default = "a"
Expand Down
1 change: 1 addition & 0 deletions test/modules/simple-types/no-variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP
2 changes: 2 additions & 0 deletions test/modules/simple-types/other-variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP

variable "a_variable_in_another_file" {
type = string
description = "a string"
Expand Down
2 changes: 2 additions & 0 deletions test/modules/simple-types/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP

variable "a_string" {
type = string
default = "a string"
Expand Down
2 changes: 2 additions & 0 deletions test/modules/simple/main.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP

terraform {
required_version = ">= 0.13.0"
}
Expand Down
2 changes: 2 additions & 0 deletions test/modules/simple/sub-module/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP

variable "should_be_ignored" {
type = string
description = "Variables in sub-modules are not read."
Expand Down
2 changes: 2 additions & 0 deletions test/modules/simple/variables.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP

variable "name" {
type = string
description = "Your name."
Expand Down
2 changes: 2 additions & 0 deletions test/modules/simple/wrong-file-type.hcl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright 2024 Hewlett Packard Enterprise Development LP

variable "a_variable_in_the_wrong_file" {
type = string
description = "A string. This should not show up in the schema, and is ignored by terraform."
Expand Down

0 comments on commit 761e789

Please sign in to comment.