<p>These are the default <a href="https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/README.md" rel="nofollow noreferrer">rules</a> for <code>tflint</code>. Most of these rules will have an example of how to trigger it and remediate it. A simple one you could use is the <code>terraform_comment_syntax</code> <a href="https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_comment_syntax.md" rel="nofollow noreferrer">rule</a>.</p>
<p>You can trigger it by using a <code>// comment</code> inside a <code>*.tf</code> file.</p>

CC BY-SA 4.0
2022-10-05T08:39:21.090Z
2022-10-05T08:39:21.090Z
Levi
<p>I am trying to test a pipeline change that will run tflint automatically, but I'm struggling to find an example of an error that won't prevent <code>terraform init</code> from completing without errors but will be caught by <code>tflint --module</code>. My goal is to prove that tflint is running is running in the pipeline and will fail any pipeline that finds linting errors. Any ideas?</p>
<p>I know there must be lots of examples, or tflint wouldn't exist - but I'm not running across them right now.</p>
<p>Examples of things I've tried so far: tflint doesn't catch white space or using dashes when underlines are more 'correct' (or is this a config issue on my part?), <code>terraform init</code> doesn't tolerate single quotes or misnamed modules.</p>

<terraform>
What is an example of an error that tflint will catch that `terraform init` will not error on?
Ethel Evans
# What is an example of an error that tflint will catch that `terraform init` will not error on?

(Asked by: username_0 on 2022-09-26)

I am trying to test a pipeline change that will run tflint automatically, but I'm struggling to find an example of an error that won't prevent `terraform init` from completing without errors but will be caught by `tflint --module`. My goal is to prove that tflint is running is running in the pipeline and will fail any pipeline that finds linting errors. Any ideas?

I know there must be lots of examples, or tflint wouldn't exist - but I'm not running across them right now.

Examples of things I've tried so far: tflint doesn't catch white space or using dashes when underlines are more 'correct' (or is this a config issue on my part?), `terraform init` doesn't tolerate single quotes or misnamed modules.

**Tags:** terraform


---

## 1 answers

### Answer by username_1 on 2022-10-05. Score: 2 | Accepted answer

These are the default [rules](https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/README.md) for `tflint`. Most of these rules will have an example of how to trigger it and remediate it. A simple one you could use is the `terraform_comment_syntax` [rule](https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_comment_syntax.md).

You can trigger it by using a `// comment` inside a `*.tf` file.


---

