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

Add support for tflint-ignore-file annotations in JSON #2230

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

isobit
Copy link

@isobit isobit commented Feb 9, 2025

I have a use case where I'm generating .tf.json files for a bunch of different root modules; these .tf.json files define several locals for convenience, which may or may not be used by the root modules they're placed in. I wanted to be able to ignore the terraform_unused_declarations rule without disabling it globally, but I realized that there wasn't a way to do this since the annotation system didn't support JSON files at all. This change adds limited support for tflint-ignore-file annotations in a top-level comment property.

@isobit isobit force-pushed the 2025-02-09/ignore-file-annotation-json branch 4 times, most recently from b5d701c to b99c64d Compare February 9, 2025 01:55
cmd/inspect.go Show resolved Hide resolved
tflint/annotation.go Outdated Show resolved Hide resolved
@isobit isobit force-pushed the 2025-02-09/ignore-file-annotation-json branch from b99c64d to 7dab624 Compare February 10, 2025 19:51
@isobit isobit requested a review from wata727 February 10, 2025 19:57
@isobit isobit force-pushed the 2025-02-09/ignore-file-annotation-json branch 2 times, most recently from e171cc2 to dfdfd18 Compare February 10, 2025 20:49
docs/user-guide/annotations.md Outdated Show resolved Hide resolved
docs/user-guide/annotations.md Outdated Show resolved Hide resolved
tflint/annotation.go Outdated Show resolved Hide resolved
tflint/annotation.go Outdated Show resolved Hide resolved
@isobit isobit force-pushed the 2025-02-09/ignore-file-annotation-json branch 2 times, most recently from 5aa0b5f to 8b15cf7 Compare February 11, 2025 03:40
@isobit isobit requested a review from bendrucker February 11, 2025 03:42
@isobit isobit force-pushed the 2025-02-09/ignore-file-annotation-json branch 2 times, most recently from 942c6fd to cf69671 Compare February 11, 2025 03:45
@isobit isobit force-pushed the 2025-02-09/ignore-file-annotation-json branch from cf69671 to bb1bf7c Compare February 11, 2025 03:46
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.

3 participants