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

docs: invalid example for comma separated ignore list #1752

Closed
wants to merge 1 commit into from

Conversation

juljaeg
Copy link

@juljaeg juljaeg commented Apr 26, 2023

No description provided.

@wata727
Copy link
Member

wata727 commented Apr 26, 2023

Thank you for opening this PR. However, I think this is a bug rather than a documentation mistake. In fact, testing has ensured that this pattern works.

{
Name: "affected (multiple rules)",
Annotation: Annotation{
Content: "other_rule, test_rule",
Token: hclsyntax.Token{
Type: hclsyntax.TokenComment,
Range: hcl.Range{
Filename: "test.tf",
Start: hcl.Pos{Line: 2},
},
},
},
Expected: true,
},

This is probably because the regexp that defines the annotation pattern does not allow spaces.

var annotationPattern = regexp.MustCompile(`tflint-ignore: (\S+)`)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants