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

Allow for specific variables to remain unused #1626

Closed
RobCoops opened this issue Jul 16, 2020 · 1 comment
Closed

Allow for specific variables to remain unused #1626

RobCoops opened this issue Jul 16, 2020 · 1 comment

Comments

@RobCoops
Copy link

cfn-lint version: latest

Description of issue.
For reasons beyond my comprehension our CI/CD process reads the contents of the cloudformation template and uses variables set in the template to associate templates with services, teams, etc.

In quite a few templates these variables are unused for anything else, which triggers the linter (rightfully so) complaining about an unused variable. Of course we could suppress the rule checking for unused variables but that is kind of silly as there are many other variables that should be used or if they are unused removed from the template.

Would it be possible to allow one to not just switch rules on or off but to tell them to ignore certain situations. If rule encounters something that looks exactly like this: some json object treat is as if its good.

I know this is an edge case and I can imagine there is no need to do this, on the other hand I do also see situations in which one might encounter an issue with the linter not wanting to stop it or skip rules that outside of this one case work perfectly fine.

@PatMyron
Copy link
Contributor

There are inline ignores at the resource-level using Metadata. Since the other template sections don't support Metadata, I think I'm going to merge this into #113

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants