Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Fix missing results excluded from report #157

Merged
merged 1 commit into from
Aug 2, 2021

Conversation

jason-fugue
Copy link
Contributor

This PR fixes a bug where missing() rule results don't show up in the report output.

@@ -88,6 +88,8 @@ missing(params) = ret {
"type": params.resource_type,
"message": object.get(params, "message", "invalid"),
"provider": object.get(params, "provider", ""),
"attribute": null,
"filepath": "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could imagine the filepath attribute being useful to indicate "a resource is missing in this template". Should I think of that as out-of-scope for this change though?

Copy link
Contributor Author

@jason-fugue jason-fugue Aug 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field is the "resource filepath". It's for the TF case where we want to show the .tf path instead of the module path. Setting it to an empty string like this means that it will always use the input filepath, which will do what you said.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thanks 👍

@jason-fugue jason-fugue merged commit 1e9f28d into master Aug 2, 2021
@jason-fugue jason-fugue deleted the jason-fugue/fix-missing-result branch August 18, 2021 20:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants