You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to be able to use certain rules it would be good to be able to disable them through an entire file. Specifically terraform_unused_declarations in my case.
Proposal
Currently, according to the documentation, # tflint-ignore: works only on the current or next line. I'd propose two changes.
a) tflint-ignore should work for a block if declared on the line directly before it
# the following awful variable names are required by our sandwich machine vendor so don't
# try to fix them or we will all go hungry.
# tflint-ignore: terraform_naming_convention
locals {
BadLENAMEDvariABle_That_HAS_2_maTCH = 42
BadLENAMEDvariABle_for_e_That_HAS_2_maTCH_2 = 3.14159265359
}
b) tflint-ignore-file should work for an entire file.
Valuable Use Case Description
The specific valuable use case I have is a single global definitions file which is included into multiple / many terraform directories as a symbolic link. In this case not all of the definitions are used in each module. I would like to disable the terraform_unused_declarations` rule in this particular file so that I can use and benefit from it in my other files.
there are almost as many different ways of doing this as there are linters ; e.g. sometimes different directives are used for like ignores and file ignores. Sometimes the same directive is used but ignores a file if it is the first declaration in the file and otherwise a like. https://flake8.pycqa.org/en/3.1.1/user/ignoring-errors.html
The text was updated successfully, but these errors were encountered:
Introduction
In order to be able to use certain rules it would be good to be able to disable them through an entire file. Specifically
terraform_unused_declarations
in my case.Proposal
Currently, according to the documentation,
# tflint-ignore:
works only on the current or next line. I'd propose two changes.a) tflint-ignore should work for a block if declared on the line directly before it
b) tflint-ignore-file should work for an entire file.
Valuable Use Case Description
The specific valuable use case I have is a single global definitions file which is included into multiple / many terraform directories as a symbolic link. In this case not all of the definitions are used in each module. I would like to disable the terraform_unused_declarations` rule in this particular file so that I can use and benefit from it in my other files.
References
The text was updated successfully, but these errors were encountered: