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
// paste code snippets here
To Trip the linter I added this in my IaC/environments/1-test folder
variable"not_used" {
description="To trip linters"type=stringdefault=null
}
tflint...................................................................Failed- hook id: tflint
- exit code:21issue(s) found:
Warning: variable "not_used" is declared but not used (terraform_unused_declarations)
on IaC/environments/1-test/compute-priv-variables.tf line 183:
183: variable"not_used" {
Reference: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/v0.2.2/docs/rules/terraform_unused_declarations.md**Expected behavior**
Since I am setting a chdir argument to scan the IaC/environments/2-staging/ folder (I tried without the trailing slash, fails as well)
I would NOT expect the linter to find the issue in the IaC/environments/1-test folder.
I would expect no errors reported
**Nice to have**- [ ] Terminal output
- [ ] Screenshots
**Additional context**
I want to be able to set different exclusion per environment. I want production to have all rules applied with lower environments I want the ability to exclude rules. I cannot do that, since chdir is not being honored. I submitted this bug in the tflint repo, they it was not their issue.
The text was updated successfully, but these errors were encountered:
Describe the bug
I want to be able to scan folders. I have tried these settings. All of these settings fail to scan JUST the folder I set:
#EXAMPLE 1
rev: v0.1.18
hooks:
args: ["--chdir=IaC/environments/2-staging/"]
#EXAMPLE 2
rev: v0.1.18
hooks:
args:
#EXAMPLE 3
rev: v0.1.18
hooks:
args:
#EXAMPLE 4
#This fails as well
rev: v0.1.18
hooks:
args:
To Reproduce
Terraform version 1.3.9
The text was updated successfully, but these errors were encountered: