Skip to content

Commit

Permalink
clarify existing job name/type
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko committed Sep 20, 2023
1 parent a9c0847 commit 07b4e9b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions internal/indexer/document_change.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ func (idx *Indexer) decodeModule(ctx context.Context, modHandle document.DirHand
_, err = idx.jobStore.EnqueueJob(ctx, job.Job{
Dir: modHandle,
Func: func(ctx context.Context) error {
return module.SchemaValidation(ctx, idx.modStore, idx.schemaStore, modHandle.Path())
return module.SchemaModuleValidation(ctx, idx.modStore, idx.schemaStore, modHandle.Path())
},
Type: op.OpTypeSchemaValidation.String(),
Type: op.OpTypeSchemaModuleValidation.String(),
DependsOn: job.IDs{metaId},
IgnoreState: ignoreState,
})
Expand Down
2 changes: 1 addition & 1 deletion internal/terraform/module/module_ops.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ func DecodeVarsReferences(ctx context.Context, modStore *state.ModuleStore, sche
return rErr
}

func SchemaValidation(ctx context.Context, modStore *state.ModuleStore, schemaReader state.SchemaReader, modPath string) error {
func SchemaModuleValidation(ctx context.Context, modStore *state.ModuleStore, schemaReader state.SchemaReader, modPath string) error {
mod, err := modStore.ModuleByPath(modPath)
if err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions internal/terraform/module/module_ops_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ func TestSchemaValidation_FullModule(t *testing.T) {
URI: "file:///test/variables.tf",
})
ctx = lsctx.WithLanguageId(ctx, ilsp.Terraform.String())
err = SchemaValidation(ctx, ss.Modules, ss.ProviderSchemas, modPath)
err = SchemaModuleValidation(ctx, ss.Modules, ss.ProviderSchemas, modPath)
if err != nil {
t.Fatal(err)
}
Expand Down Expand Up @@ -1043,7 +1043,7 @@ func TestSchemaValidation_SingleFile(t *testing.T) {
URI: "file:///test/variables.tf",
})
ctx = lsctx.WithLanguageId(ctx, ilsp.Terraform.String())
err = SchemaValidation(ctx, ss.Modules, ss.ProviderSchemas, modPath)
err = SchemaModuleValidation(ctx, ss.Modules, ss.ProviderSchemas, modPath)
if err != nil {
t.Fatal(err)
}
Expand Down
6 changes: 3 additions & 3 deletions internal/terraform/module/operation/op_type_string.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion internal/terraform/module/operation/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
OpTypeGetModuleDataFromRegistry
OpTypeParseProviderVersions
OpTypePreloadEmbeddedSchema
OpTypeSchemaValidation
OpTypeSchemaModuleValidation
OpTypeSchemaVarsValidation
OpTypeReferenceValidation
OpTypeTerraformValidate
Expand Down

0 comments on commit 07b4e9b

Please sign in to comment.