bflad / tfproviderlint

Terraform Provider Lint Tool
Mozilla Public License 2.0
134 stars 25 forks source link

XR005 False positive on multi-line descriptions #240

Closed armsnyder closed 3 years ago

armsnyder commented 3 years ago

Community Note

tfproviderlint and terraform-plugin-sdk Version

tfproviderlint v0.27.0 terraform-plugin-sdk v1.16.1

Affected Check(s) or Function(s)

Expected Behavior

func g() *schema.Resource {
    return &schema.Resource{
        Description: "Line one\n\n" +
            "Line two",
        Read:   readFunc,
        Create: createFunc,
        Schema: map[string]*schema.Schema{},
    }
}

Should be accepted. (It is common for resource descriptions to be long and need to be broken up.)

Actual Behavior

The linter complains.

XR005: resource should configure Description

I will try to resolve this and may submit a PR sometime this week.