in rules/module_source.go [84:99]
func (t *ModuleSourceRule) checkBlock(r tflint.Runner, block *hclext.Block) error {
source, exists := block.Body.Attributes["source"]
if !exists {
return r.EmitIssue(
t,
"The `source` field should be declared in the `module` block",
block.DefRange,
)
}
if err := r.EvaluateExpr(source.Expr, t.isAVMModule(r, source.NameRange), &tflint.EvaluateExprOption{ModuleCtx: tflint.RootModuleCtxType}); err != nil {
return err
}
return nil
}