Skip to content

Commit

Permalink
Merge pull request #31 from bflad/v-terraform-plugin-sdk-v1.0.0
Browse files Browse the repository at this point in the history
deps: Migrate from github.com/hashicorp/terraform to github.com/hashicorp/terraform-plugin-sdk
  • Loading branch information
bflad authored Sep 26, 2019
2 parents 4c30176 + 9f369dd commit 86ad4f2
Show file tree
Hide file tree
Showing 937 changed files with 29,661 additions and 35,950 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ module github.com/bflad/tfproviderlint
go 1.12

require (
github.com/hashicorp/terraform v0.12.7
github.com/hashicorp/terraform-plugin-sdk v1.0.0
golang.org/x/tools v0.0.0-20190823093517-aa644d2adf2a
)
423 changes: 99 additions & 324 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion helper/terraformtype/terraformtype.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func IsTypeHelperSchema(t types.Type) bool {
return false
}
// HasSuffix here due to vendoring
if !strings.HasSuffix(t.Obj().Pkg().Path(), "github.com/hashicorp/terraform/helper/schema") {
if !strings.HasSuffix(t.Obj().Pkg().Path(), "github.com/hashicorp/terraform-plugin-sdk/helper/schema") {
return false
}
}
Expand Down
2 changes: 1 addition & 1 deletion passes/AT001/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
r "github.com/hashicorp/terraform/helper/resource"
r "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/AT001/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
r "github.com/hashicorp/terraform/helper/resource"
r "github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/AT001/testdata/src/a/data_source_prefix_ignore.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package a
import (
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func ffilenameignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/AT001/testdata/src/a/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package a
import (
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/AT004/testdata/src/a/a.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/hashicorp/terraform/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/helper/resource"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R001/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# R001

The R001 analyzer reports a complex key argument for a [`Set()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Set)
The R001 analyzer reports a complex key argument for a [`Set()`](https://godoc.org/github.com/hashicorp/terraform-plugin-sdk/helper/schema#ResourceData.Set)
call. It is preferred to explicitly use a string literal as the key argument.

## Flagged Code
Expand Down
2 changes: 1 addition & 1 deletion passes/R001/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R001/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R001/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R002/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# R002

The R002 analyzer reports likely extraneous uses of
star (`*`) dereferences for a [`Set()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Set) call. The `Set()` function automatically
star (`*`) dereferences for a [`Set()`](https://godoc.org/github.com/hashicorp/terraform-plugin-sdk/helper/schema#ResourceData.Set) call. The `Set()` function automatically
handles pointers and `*` dereferences without `nil` checks can panic.

## Flagged Code
Expand Down
2 changes: 1 addition & 1 deletion passes/R002/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R002/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R002/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R003/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R003/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R003/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R004/R004.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func isAllowedType(t types.Type) bool {
return false
}
// HasSuffix here due to vendoring
if !strings.HasSuffix(t.Obj().Pkg().Path(), "github.com/hashicorp/terraform/helper/schema") {
if !strings.HasSuffix(t.Obj().Pkg().Path(), "github.com/hashicorp/terraform-plugin-sdk/helper/schema") {
return false
}
case *types.Pointer:
Expand Down
4 changes: 2 additions & 2 deletions passes/R004/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# R004

The R004 analyzer reports incorrect types for a [`Set()`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#ResourceData.Set) call value.
The R004 analyzer reports incorrect types for a [`Set()`](https://godoc.org/github.com/hashicorp/terraform-plugin-sdk/helper/schema#ResourceData.Set) call value.
The `Set()` function only supports a subset of basic types, slices and maps of that
subset of basic types, and the [`schema.Set`](https://godoc.org/github.com/hashicorp/terraform/helper/schema#Set) type.
subset of basic types, and the [`schema.Set`](https://godoc.org/github.com/hashicorp/terraform-plugin-sdk/helper/schema#Set) type.

## Flagged Code

Expand Down
2 changes: 1 addition & 1 deletion passes/R004/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package a
import (
"time"

s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R004/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package a
import (
"time"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/R004/testdata/src/a/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package a
import (
"time"

"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S001/S001.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
continue
case *types.Named:
// HasSuffix here due to vendoring
if !strings.HasSuffix(t.Obj().Pkg().Path(), "github.com/hashicorp/terraform/helper/schema") {
if !strings.HasSuffix(t.Obj().Pkg().Path(), "github.com/hashicorp/terraform-plugin-sdk/helper/schema") {
continue
}

Expand Down
2 changes: 1 addition & 1 deletion passes/S001/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S001/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S001/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S002/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S002/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S002/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S003/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S003/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S003/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S004/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S004/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S004/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S005/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S005/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S005/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S006/S006.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func run(pass *analysis.Pass) (interface{}, error) {
continue
case *types.Named:
// HasSuffix here due to vendoring
if !strings.HasSuffix(t.Obj().Pkg().Path(), "github.com/hashicorp/terraform/helper/schema") {
if !strings.HasSuffix(t.Obj().Pkg().Path(), "github.com/hashicorp/terraform-plugin-sdk/helper/schema") {
continue
}

Expand Down
2 changes: 1 addition & 1 deletion passes/S006/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S006/testdata/src/a/comment_ignore.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func fcommentignore() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S006/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
"github.com/hashicorp/terraform/helper/schema"
"github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func f() {
Expand Down
2 changes: 1 addition & 1 deletion passes/S007/testdata/src/a/alias.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package a

import (
s "github.com/hashicorp/terraform/helper/schema"
s "github.com/hashicorp/terraform-plugin-sdk/helper/schema"
)

func falias() {
Expand Down
Loading

0 comments on commit 86ad4f2

Please sign in to comment.