Skip to content

Commit

Permalink
ignore some files
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWoolfenden committed Aug 4, 2022
1 parent 1a70ac1 commit 817130f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ func GetResources(file string) ([]ResourceV2, error) {
var resource ResourceV2
resource.TypeName = block.Type

if resource.TypeName == "terraform" || resource.TypeName == "output" || resource.TypeName == "provider" {
ignore := []string{"terraform", "output", "provider", "variable", "locals"}

if stringInSlice(resource.TypeName, ignore) {
continue
}

Expand Down
4 changes: 3 additions & 1 deletion src/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ func Scan(dirname string) error {
//parse the other files
log.Print(err)
}
resources = append(resources, resource...)
if resource != nil {
resources = append(resources, resource...)
}
}
var PermissionBag Sorted

Expand Down

0 comments on commit 817130f

Please sign in to comment.