Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .ci/.golangci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

version: "2"
linters:
default: none
Expand Down
3 changes: 3 additions & 0 deletions .ci/.golangci2.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

version: "2"
linters:
default: none
Expand Down
3 changes: 3 additions & 0 deletions .ci/.golangci3.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

version: "2"
linters:
default: none
Expand Down
3 changes: 3 additions & 0 deletions .ci/.golangci4.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

version: "2"
linters:
default: none
Expand Down
3 changes: 3 additions & 0 deletions .ci/.golangci5.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

version: "2"
linters:
default: none
Expand Down
3 changes: 3 additions & 0 deletions .ci/.semgrep.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

rules:
- id: acceptance-test-naming-parent-disappears
languages: [go]
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- Copyright IBM Corp. 2014, 2025 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->

# providerlint

The `providerlint` tool is a Terraform Provider code linting tool, specifically tailored for the Terraform AWS Provider.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package keyvaluetags

const (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package keyvaluetags

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package keyvaluetags

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package keyvaluetags

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

// The providerlint command is a static checker for the Terraform AWS Provider.
package main

Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT001/AWSAT001.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSAT001

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT001/AWSAT001_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSAT001_test

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT001/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- Copyright IBM Corp. 2014, 2025 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->

# AWSAT001

The `AWSAT001` analyzer reports when a `resource.TestMatchResourceAttr()` call references an Amazon
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT001/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package a

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT002/AWSAT002.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

// Package AWSAT002 defines an Analyzer that checks for
// hardcoded AMI IDs
package AWSAT002
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT002/AWSAT002_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSAT002_test

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT002/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- Copyright IBM Corp. 2014, 2025 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->

# AWSAT002

The AWSAT002 analyzer reports hardcoded AMI IDs. AMI IDs are region dependent and tests will fail in any region or partition other than where the AMI was created.
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT002/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package a

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT003/AWSAT003.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

// Package AWSAT003 defines an Analyzer that checks for
// hardcoded regions
package AWSAT003
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT003/AWSAT003_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSAT003_test

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT003/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- Copyright IBM Corp. 2014, 2025 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->

# AWSAT003

The AWSAT003 analyzer reports hardcoded AWS regions. Tests that are hardcoded
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT003/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package a

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT004/AWSAT004.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

// Package AWSAT004 defines an Analyzer that checks for
// TestCheckResourceAttr() calls with hardcoded TypeSet state hashes
package AWSAT004
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT004/AWSAT004_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSAT004_test

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT004/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- Copyright IBM Corp. 2014, 2025 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->

# AWSAT004

The AWSAT004 analyzer reports TestCheckResourceAttr() calls with hardcoded
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT004/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package a

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT005/AWSAT005.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

// Package AWSAT005 defines an Analyzer that checks for
// hardcoded AWS partitions in ARNs
package AWSAT005
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT005/AWSAT005_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSAT005_test

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT005/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- Copyright IBM Corp. 2014, 2025 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->

# AWSAT005

The AWSAT005 analyzer reports hardcoded AWS partitions in ARNs. For tests to
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT005/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package a

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT006/AWSAT006.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

// Package AWSAT006 defines an Analyzer that checks for
// hardcoded AWS partition DNS suffixes
package AWSAT006
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT006/AWSAT006_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSAT006_test

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT006/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- Copyright IBM Corp. 2014, 2025 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->

# AWSAT006

The AWSAT006 analyzer reports hardcoded AWS partition DNS suffixes. For tests
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSAT006/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package a

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSR001/AWSR001.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSR001

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSR001/AWSR001_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSR001

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSR001/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- Copyright IBM Corp. 2014, 2025 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->

# AWSR001

The `AWSR001` analyzer reports when a fmt.Sprintf() call contains the format string ending `.amazonaws.com`. This domain suffix is only valid in the AWS Commercial and GovCloud (US) partitions.
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSR001/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package a

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSR002/AWSR002.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSR002

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSR002/AWSR002_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSR002

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSR002/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- Copyright IBM Corp. 2014, 2025 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->

# AWSR002

The AWSR002 analyzer reports when a [(schema.ResourceData).Set()](https://pkg.go.dev/github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema?tab=doc#ResourceData.Set) call with the `tags` key is missing a call to `(keyvaluetags.KeyValueTags).IgnoreConfig()` in the value, which ensures any provider level ignore tags configuration is applied.
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSV001/AWSV001.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSV001

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSV001/AWSV001_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package AWSV001

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSV001/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
<!-- Copyright IBM Corp. 2014, 2025 -->
<!-- SPDX-License-Identifier: MPL-2.0 -->

# AWSV001

The `AWSV001` analyzer reports when a `validation.StringInSlice()` call has the first parameter of a `[]string`, which suggests either that AWS API model constants are not available or that the usage is prior to the AWS Go SDK adding functions that return all values for the enumeration type.
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/AWSV001/testdata/src/a/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package a

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/checks.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package passes

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/providerlint/passes/checks_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package passes

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/semgrep/acctest/checks/arn.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package main

import (
Expand Down
3 changes: 3 additions & 0 deletions .ci/semgrep/acctest/checks/arn.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

rules:
- id: arn-resourceattrset
languages: [go]
Expand Down
3 changes: 3 additions & 0 deletions .ci/semgrep/acctest/checks/planonly.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

rules:
- id: replace-planonly-checks
languages: [go]
Expand Down
3 changes: 3 additions & 0 deletions .ci/semgrep/acctest/naming/literals.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

rules:
- id: attr-names-as-test-names
languages: [go]
Expand Down
3 changes: 3 additions & 0 deletions .ci/semgrep/acctest/naming/naming.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

rules:
- id: destroy-check
languages: [go]
Expand Down
3 changes: 3 additions & 0 deletions .ci/semgrep/acctest/plugin-testing/knownvalue_account_id.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright IBM Corp. 2014, 2025
// SPDX-License-Identifier: MPL-2.0

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

rules:
- id: knownvalue_account_id
languages: [go]
Expand Down
3 changes: 3 additions & 0 deletions .ci/semgrep/acctest/steps.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright IBM Corp. 2014, 2025
# "SPDX-License-Identifier: MPL-2.0"

rules:
- id: checks-with-expecterror
languages: [go]
Expand Down
Loading
Loading