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

XS001 False positive when descriptions come from map #241

Closed
armsnyder opened this issue Jul 19, 2021 · 0 comments · Fixed by #242
Closed

XS001 False positive when descriptions come from map #241

armsnyder opened this issue Jul 19, 2021 · 0 comments · Fixed by #242
Assignees
Labels
ast AST Handling bug Something isn't working check/schema Schema Check
Milestone

Comments

@armsnyder
Copy link
Contributor

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

tfproviderlint and terraform-plugin-sdk Version

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

Affected Check(s) or Function(s)

  • XS001

Expected Behavior

func Provider() terraform.ResourceProvider {
	provider := &schema.Provider{
		Schema: map[string]*schema.Schema{
			"token": {
				Type:        schema.TypeString,
				Required:    true,
				Description: descriptions["token"],
			},
...
func init() {
	descriptions = map[string]string{
		"token": "The OAuth token used to connect to the API.",
...

Should be accepted.

Actual Behavior

The linter complains.

XS001: schema should configure Description

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

@bflad bflad self-assigned this Jul 20, 2021
@bflad bflad added bug Something isn't working ast AST Handling labels Jul 20, 2021
@bflad bflad added this to the v0.27.1 milestone Jul 20, 2021
@bflad bflad added the check/schema Schema Check label Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ast AST Handling bug Something isn't working check/schema Schema Check
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants