Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typos #2198

Merged
merged 1 commit into from
Dec 30, 2024
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ plugin "aws" {
}
```

For backward compatibility, The AWS ruleset plugin is bundled with the binary. So you can still use AWS rules without installing the plugin separetely. The plugin is automatically enabled if there are AWS resources in your Terraform configuration, but it can also be turned on explicitly. See https://github.com/terraform-linters/tflint/pull/1009 for details.
For backward compatibility, The AWS ruleset plugin is bundled with the binary. So you can still use AWS rules without installing the plugin separately. The plugin is automatically enabled if there are AWS resources in your Terraform configuration, but it can also be turned on explicitly. See https://github.com/terraform-linters/tflint/pull/1009 for details.

### Breaking Changes

Expand Down Expand Up @@ -1028,7 +1028,7 @@ Also, this release is built with Go v1.15. As a result, darwin/386 build will no

TFLint v0.19 relies on and is compatible with Terraform v0.13! 🎉

This version is also compatible with most Terraform v0.12 configurations without an immediate update to Terraform v0.13. [Custom variable validation](https://www.terraform.io/docs/configuration/variables.html#custom-validation-rules) was officially added in v0.13. Any modules that enabled this featue during the experiment phase must remove the experiment setting to be compatible with Terraform v0.13. Consult the [Terraform 0.13.0 changelog](https://github.com/hashicorp/terraform/blob/master/CHANGELOG.md#0130-august-10-2020) for a full list of breaking changes. We recommend all users update when possible.
This version is also compatible with most Terraform v0.12 configurations without an immediate update to Terraform v0.13. [Custom variable validation](https://www.terraform.io/docs/configuration/variables.html#custom-validation-rules) was officially added in v0.13. Any modules that enabled this feature during the experiment phase must remove the experiment setting to be compatible with Terraform v0.13. Consult the [Terraform 0.13.0 changelog](https://github.com/hashicorp/terraform/blob/master/CHANGELOG.md#0130-august-10-2020) for a full list of breaking changes. We recommend all users update when possible.

### Breaking Changes

Expand Down Expand Up @@ -1169,7 +1169,7 @@ This release contains several improvements for plugins. In order to take advanta

In this release, some great Terraform rules are added by great contributors! Please note that many rules are not enabled by default. You need to set it appropriately according to your policy.

The naming convention rules have been merged into the `terraform_naming_convetion` rule, so if you are using the `terraform_dash_in_*` rules you will need to change your configuration. See the documentation for details.
The naming convention rules have been merged into the `terraform_naming_convention` rule, so if you are using the `terraform_dash_in_*` rules you will need to change your configuration. See the documentation for details.

### Breaking Changes

Expand Down Expand Up @@ -1426,7 +1426,7 @@ This is the first release in the terraform-linters organization. This release in

## 0.12.0 (2019-09-29)

This release includes an experimental Language Server Procotol support. Using LSP makes it easy to integrate TFLint with your favorite editor. Currently, only diagnostics are provided.
This release includes an experimental Language Server Protocol support. Using LSP makes it easy to integrate TFLint with your favorite editor. Currently, only diagnostics are provided.

### Breaking Changes

Expand Down Expand Up @@ -1474,7 +1474,7 @@ This release includes an experimental Language Server Procotol support. Using LS

### Chores

- [#435](https://github.com/terraform-linters/tflint/pull/435): docs: Add Linix oneliner to download latest `tflint` ([@abitrolly](https://github.com/abitrolly))
- [#435](https://github.com/terraform-linters/tflint/pull/435): docs: Add Linux oneliner to download latest `tflint` ([@abitrolly](https://github.com/abitrolly))
- [#437](https://github.com/terraform-linters/tflint/pull/437): docs: Fix typo in dash rule ([@abitrolly](https://github.com/abitrolly))

## 0.11.1 (2019-09-11)
Expand Down Expand Up @@ -1725,7 +1725,7 @@ As a major improvement, added 700+ rules in this release. These rules are automa
### Enhancements

- [#277](https://github.com/terraform-linters/tflint/pull/277): Ignore annotation support.
- `tflint-ignore: rule_name` annotation is now availble. See [README.md](https://github.com/terraform-linters/tflint/blob/v0.8.1/README.md#rules).
- `tflint-ignore: rule_name` annotation is now available. See [README.md](https://github.com/terraform-linters/tflint/blob/v0.8.1/README.md#rules).

### BugFixes

Expand Down Expand Up @@ -1925,7 +1925,7 @@ Minor version update. This release includes environment variable support.
### Enhancements

- Support variables from environment variables ([#147](https://github.com/terraform-linters/tflint/pull/147))
- Support moudle path for v0.10.7 ([#149](https://github.com/terraform-linters/tflint/pull/149))
- Support module path for v0.10.7 ([#149](https://github.com/terraform-linters/tflint/pull/149))

### Others

Expand Down
2 changes: 1 addition & 1 deletion cmd/inspect_parallel.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func spawnWorker(ctx context.Context, executable string, workingDir string, opts
cmd.WaitDelay = 3 * time.Second
err := cmd.Run()
if ctx.Err() != nil {
// If the context is canceled, return the context error instread of the command error.
// If the context is canceled, return the context error instead of the command error.
err = ctx.Err()
}

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ The `plugin.Discovery` returns a client for the RuleSet server it started. Use t

Similarly, send inspection requests to the server. The server responds to requests and runs an inspection, but the plugin needs access to `terraform.Config` (imagine `runner.GetResourceContent`).

For this, the host process launches a gRPC server to respond such requests. Ths host server is called "Runner" server. Its behavior is implemented by TFLint. The plugin is passed a client that corresponds to the Runner server.
For this, the host process launches a gRPC server to respond such requests. The host server is called "Runner" server. Its behavior is implemented by TFLint. The plugin is passed a client that corresponds to the Runner server.

### Respond to requests for Terraform config (`plugin.GRPCServer`)

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ TFLint supports the [`count`](https://developer.hashicorp.com/terraform/language
resource "aws_instance" "foo" {
count = 0

instance_type = "invalid" # => ignored because ths resource is not created
instance_type = "invalid" # => ignored because the resource is not created
}
```

Expand Down
2 changes: 1 addition & 1 deletion integrationtest/init/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ func TestIntegration(t *testing.T) {
t.Fatalf("Expected to contain working dir log, but did not: stdout=%s, stderr=%s", outStream, errStream)
}
if !strings.Contains(outStream.String(), "All plugins are already installed") {
t.Fatalf("Expected to contain alread installed log, but did not: stdout=%s, stderr=%s", outStream, errStream)
t.Fatalf("Expected to contain already installed log, but did not: stdout=%s, stderr=%s", outStream, errStream)
}

outStream, errStream = new(bytes.Buffer), new(bytes.Buffer)
Expand Down
2 changes: 1 addition & 1 deletion integrationtest/inspection/inspection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func TestIntegration(t *testing.T) {
Dir: "eval-on-root-context",
},
{
Name: "sensitve variable",
Name: "sensitive variable",
Command: "tflint --format json",
Dir: "sensitive",
},
Expand Down
2 changes: 1 addition & 1 deletion integrationtest/inspection/map-attribute/template.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resource "aws_instance" "intance" {
resource "aws_instance" "instance" {
tags = { foo = "bar" }
}

Expand Down
8 changes: 4 additions & 4 deletions plugin/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,18 +123,18 @@ func getPluginDir(cfg *tflint.Config) (string, error) {
// and if it exists, the extension is added to the argument.
func findPluginPath(path string) (string, error) {
if runtime.GOOS != "windows" {
return checkPluginExistance(path)
return checkPluginExistence(path)
}

returnPath, err := checkPluginExistance(path)
returnPath, err := checkPluginExistence(path)
if os.IsNotExist(err) {
return checkPluginExistance(path + ".exe")
return checkPluginExistence(path + ".exe")
}

return returnPath, err
}

func checkPluginExistance(path string) (string, error) {
func checkPluginExistence(path string) (string, error) {
info, err := os.Stat(path)
if err != nil {
return "", err
Expand Down
2 changes: 1 addition & 1 deletion plugin/signature.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func (c *SignatureChecker) VerifyKeyless(target io.ReadSeeker, attestations []*g
//
// - Signed Entity Timestamp (SET), the time that the short-lived certificate was valid
// - Certificate Transparency Logs, as public records
// - Signed Cerificate Timestamp (SCT), the time that the certificate was issued
// - Signed Certificate Timestamp (SCT), the time that the certificate was issued
verifier, err := verify.NewSignedEntityVerifier(
trustedRoot,
verify.WithObserverTimestamps(1),
Expand Down
12 changes: 6 additions & 6 deletions plugin/signature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ func Test_GetSigningKey(t *testing.T) {
Expected: testSigningKey,
},
{
Name: "bulit-in signing key",
Name: "built-in signing key",
Config: NewInstallConfig(tflint.EmptyConfig(), &tflint.PluginConfig{SigningKey: "", SourceOwner: "terraform-linters"}),
Expected: builtinSigningKey,
},
{
Name: "bulit-in signing key and configured signing key",
Name: "built-in signing key and configured signing key",
Config: NewInstallConfig(tflint.EmptyConfig(), &tflint.PluginConfig{SigningKey: testSigningKey, SourceOwner: "terraform-linters"}),
Expected: testSigningKey,
},
{
Name: "bulit-in signing key, but in experimental mode",
Name: "built-in signing key, but in experimental mode",
Config: NewInstallConfig(tflint.EmptyConfig(), &tflint.PluginConfig{SigningKey: "", SourceOwner: "terraform-linters"}),
Envs: map[string]string{"TFLINT_EXPERIMENTAL": "true"},
Expected: "",
Expand Down Expand Up @@ -81,17 +81,17 @@ func Test_HasSigningKey(t *testing.T) {
Expected: true,
},
{
Name: "bulit-in signing key",
Name: "built-in signing key",
Config: NewInstallConfig(tflint.EmptyConfig(), &tflint.PluginConfig{SigningKey: "", SourceOwner: "terraform-linters"}),
Expected: true,
},
{
Name: "bulit-in signing key and configured signing key",
Name: "built-in signing key and configured signing key",
Config: NewInstallConfig(tflint.EmptyConfig(), &tflint.PluginConfig{SigningKey: testSigningKey, SourceOwner: "terraform-linters"}),
Expected: true,
},
{
Name: "bulit-in signing key, but in experimental mode",
Name: "built-in signing key, but in experimental mode",
Config: NewInstallConfig(tflint.EmptyConfig(), &tflint.PluginConfig{SigningKey: "", SourceOwner: "terraform-linters"}),
Envs: map[string]string{"TFLINT_EXPERIMENTAL": "true"},
Expected: false,
Expand Down
2 changes: 1 addition & 1 deletion terraform/addrs/instance_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func ParseInstanceKey(key cty.Value) (InstanceKey, error) {
}
}

// NoKey represents the absense of an InstanceKey, for the single instance
// NoKey represents the absence of an InstanceKey, for the single instance
// of a configuration object that does not use "count" or "for_each" at all.
var NoKey InstanceKey

Expand Down
4 changes: 2 additions & 2 deletions terraform/addrs/module_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func ParseModuleSource(raw string) (ModuleSource, error) {
// and then create relative references within the same directory in order
// to ensure all modules in the package are looking at a consistent filesystem
// layout. We also assume that modules within a package are maintained together,
// which means that cross-cutting maintenence across all of them would be
// which means that cross-cutting maintenance across all of them would be
// possible.
//
// The actual value of a ModuleSourceLocal is a normalized relative path using
Expand Down Expand Up @@ -106,7 +106,7 @@ func parseModuleSourceLocal(raw string) (ModuleSourceLocal, error) {
clean := path.Clean(raw)

// However, we do need to keep a single "./" on the front if it isn't
// a "../" path, or else it would be ambigous with the registry address
// a "../" path, or else it would be ambiguous with the registry address
// syntax.
if !strings.HasPrefix(clean, "../") {
clean = "./" + clean
Expand Down
2 changes: 1 addition & 1 deletion terraform/addrs/parse_ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Reference struct {
Remaining hcl.Traversal
}

// ParseRef attempts to extract a referencable address from the prefix of the
// ParseRef attempts to extract a referenceable address from the prefix of the
// given traversal, which must be an absolute traversal or this function
// will panic.
//
Expand Down
2 changes: 1 addition & 1 deletion terraform/collections/unique_key.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type UniqueKey[T any] interface {

// A UniqueKeyer is a type that knows how to calculate a unique key itself.
type UniqueKeyer[T any] interface {
// UniqueKey returns the unique key of the reciever.
// UniqueKey returns the unique key of the receiver.
//
// A correct implementation of UniqueKey must return a distinct value
// for each unique value of T, where the uniqueness of T values is decided
Expand Down
2 changes: 1 addition & 1 deletion terraform/evaluator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ variable "integer_var" {
},
},
{
name: "no defualt variable",
name: "no default variable",
config: `variable "no_value_var" {}`,
expr: expr(`var.no_value_var`),
ty: cty.String,
Expand Down
2 changes: 1 addition & 1 deletion terraform/ipaddr/ip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ var parseCIDRTests = []struct {
{"0.0.0.-3/32", nil, nil, &ParseError{Type: "CIDR address", Text: "0.0.0.-3/32"}},
{"0.0.0.0/-0", nil, nil, &ParseError{Type: "CIDR address", Text: "0.0.0.0/-0"}},
//
// NOTE: Theis correct failure was added for go-1.17, but is a
// NOTE: This correct failure was added for go-1.17, but is a
// backwards-incompatible change for Terraform users, who might have
// already written modules using leading zeroes.
//
Expand Down
6 changes: 3 additions & 3 deletions terraform/lang/funcs/cidr.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/zclconf/go-cty/cty/gocty"
)

// CidrHostFunc contructs a function that calculates a full host IP address
// CidrHostFunc constructs a function that calculates a full host IP address
// within a given IP network address prefix.
var CidrHostFunc = function.New(&function.Spec{
Params: []function.Parameter{
Expand Down Expand Up @@ -48,7 +48,7 @@ var CidrHostFunc = function.New(&function.Spec{
},
})

// CidrNetmaskFunc contructs a function that converts an IPv4 address prefix given
// CidrNetmaskFunc constructs a function that converts an IPv4 address prefix given
// in CIDR notation into a subnet mask address.
var CidrNetmaskFunc = function.New(&function.Spec{
Params: []function.Parameter{
Expand All @@ -73,7 +73,7 @@ var CidrNetmaskFunc = function.New(&function.Spec{
},
})

// CidrSubnetFunc contructs a function that calculates a subnet address within
// CidrSubnetFunc constructs a function that calculates a subnet address within
// a given IP network address prefix.
var CidrSubnetFunc = function.New(&function.Spec{
Params: []function.Parameter{
Expand Down
4 changes: 2 additions & 2 deletions terraform/lang/funcs/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ func TestLookup(t *testing.T) {
cty.StringVal("beep").Mark("a"),
false,
},
{ // apply collection marks to unknown return vaue
{ // apply collection marks to unknown return value
[]cty.Value{
cty.MapVal(map[string]cty.Value{
"boop": cty.StringVal("beep"),
Expand Down Expand Up @@ -1727,7 +1727,7 @@ func TestTranspose(t *testing.T) {
cty.NilVal,
true,
},
{ // marks (deep or shallow) on any elements will propegate to the entire return value
{ // marks (deep or shallow) on any elements will propagate to the entire return value
cty.MapVal(map[string]cty.Value{
"key1": cty.ListVal([]cty.Value{
cty.StringVal("a").Mark("beep"), // mark on the inner list element
Expand Down
10 changes: 5 additions & 5 deletions terraform/lang/funcs/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ var BcryptFunc = function.New(&function.Spec{
input := args[0].AsString()
out, err := bcrypt.GenerateFromPassword([]byte(input), defaultCost)
if err != nil {
return cty.UnknownVal(cty.String), fmt.Errorf("error occured generating password %s", err.Error())
return cty.UnknownVal(cty.String), fmt.Errorf("error occurred generating password %s", err.Error())
}

return cty.StringVal(string(out)), nil
Expand Down Expand Up @@ -171,7 +171,7 @@ var RsaDecryptFunc = function.New(&function.Spec{
case asn1.SyntaxError:
errStr = strings.ReplaceAll(e.Error(), "asn1: syntax error", "invalid ASN1 data in the given private key")
case asn1.StructuralError:
errStr = strings.ReplaceAll(e.Error(), "asn1: struture error", "invalid ASN1 data in the given private key")
errStr = strings.ReplaceAll(e.Error(), "asn1: structure error", "invalid ASN1 data in the given private key")
default:
errStr = fmt.Sprintf("invalid private key: %s", e)
}
Expand All @@ -191,7 +191,7 @@ var RsaDecryptFunc = function.New(&function.Spec{
},
})

// Sha1Func contructs a function that computes the SHA1 hash of a given string
// Sha1Func constructs a function that computes the SHA1 hash of a given string
// and encodes it with hexadecimal digits.
var Sha1Func = makeStringHashFunction(sha1.New, hex.EncodeToString)

Expand All @@ -201,7 +201,7 @@ func MakeFileSha1Func(baseDir string) function.Function {
return makeFileHashFunction(baseDir, sha1.New, hex.EncodeToString)
}

// Sha256Func contructs a function that computes the SHA256 hash of a given string
// Sha256Func constructs a function that computes the SHA256 hash of a given string
// and encodes it with hexadecimal digits.
var Sha256Func = makeStringHashFunction(sha256.New, hex.EncodeToString)

Expand All @@ -211,7 +211,7 @@ func MakeFileSha256Func(baseDir string) function.Function {
return makeFileHashFunction(baseDir, sha256.New, hex.EncodeToString)
}

// Sha512Func contructs a function that computes the SHA512 hash of a given string
// Sha512Func constructs a function that computes the SHA512 hash of a given string
// and encodes it with hexadecimal digits.
var Sha512Func = makeStringHashFunction(sha512.New, hex.EncodeToString)

Expand Down
4 changes: 2 additions & 2 deletions terraform/lang/funcs/crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func TestBase64Sha256(t *testing.T) {
cty.StringVal("n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg="),
false,
},
// This would differ because we're base64-encoding hex represantiation, not raw bytes.
// This would differ because we're base64-encoding hex representation, not raw bytes.
// base64encode(sha256("test")) =
// "OWY4NmQwODE4ODRjN2Q2NTlhMmZlYWEwYzU1YWQwMTVhM2JmNGYxYjJiMGI4MjJjZDE1ZDZjMTViMGYwMGEwOA=="
}
Expand Down Expand Up @@ -177,7 +177,7 @@ func TestBase64Sha512(t *testing.T) {
cty.StringVal("7iaw3Ur350mqGo7jwQrpkj9hiYB3Lkc/iBml1JQODbJ6wYX4oOHV+E+IvIh/1nsUNzLDBMxfqa2Ob1f1ACio/w=="),
false,
},
// This would differ because we're base64-encoding hex represantiation, not raw bytes
// This would differ because we're base64-encoding hex representation, not raw bytes
// base64encode(sha512("test")) =
// "OZWUyNmIwZGQ0YWY3ZTc0OWFhMWE4ZWUzYzEwYWU5OTIzZjYxODk4MDc3MmU0NzNmODgxOWE1ZDQ5NDBlMGRiMjdhYzE4NWY4YTBlMWQ1Zjg0Zjg4YmM4ODdmZDY3YjE0MzczMmMzMDRjYzVmYTlhZDhlNmY1N2Y1MDAyOGE4ZmY="
}
Expand Down
2 changes: 1 addition & 1 deletion terraform/lang/funcs/datetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ var TimeCmpFunc = function.New(&function.Spec{
case tsA.Before(tsB):
return cty.NumberIntVal(-1), nil
default:
// By elimintation, tsA must be after tsB.
// By elimination, tsA must be after tsB.
return cty.NumberIntVal(1), nil
}
},
Expand Down
Loading
Loading