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

Ignore annotation support #277

Merged
merged 1 commit into from
May 29, 2019
Merged

Ignore annotation support #277

merged 1 commit into from
May 29, 2019

Conversation

wata727
Copy link
Member

@wata727 wata727 commented May 17, 2019

Fixes #142

This PR introduces Ignore Annotation syntax. This annotation can be used to ignore issues that occur on a specific line. Here is an example:

resource "aws_instance" "foo" {
    // tflint-ignore: aws_instance_invalid_type
    instance_type = "t1.2xlarge"
}

Annotations affect only for the same line or the below:

resource "aws_instance" "foo" {
    instance_type = "t1.2xlarge" # tflint-ignore: aws_instance_invalid_type
}

The type of comment does not matter. This means that //, # or /*...*/ can be used. You can also use tflint-ignore: all if you want to ignore regardless of rules:

resource "aws_instance" "foo" {
    /* tflint-ignore: all */
    instance_type = "t1.2xlarge"
}

ToDo

  • Add documentation

@wata727 wata727 added this to the v0.9.0 milestone May 17, 2019
@wata727 wata727 marked this pull request as ready for review May 18, 2019 09:30
@wata727 wata727 force-pushed the ignore_comments branch 2 times, most recently from 035d459 to 0dd2162 Compare May 18, 2019 09:35
@wata727 wata727 changed the base branch from next_tflint_dev to master May 25, 2019 18:05
@wata727 wata727 force-pushed the ignore_comments branch 2 times, most recently from 9f0f6d0 to 39d605f Compare May 26, 2019 06:14
@wata727 wata727 merged commit ab9ed95 into master May 29, 2019
@wata727 wata727 deleted the ignore_comments branch May 29, 2019 16:24
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.

Question - Is it possible to ignore rules by resource/file?
1 participant