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

The check for ignoring should use the resource block #782

Merged
merged 1 commit into from Jun 11, 2021

Conversation

owenrumney
Copy link
Contributor

@owenrumney owenrumney commented Jun 11, 2021

  • take the range details from the resource block rather than the result
    block

  • add a check for someone adding the tfsec ignore in about the result
    block

Resolves #781

@owenrumney owenrumney requested a review from liamg as a code owner June 11, 2021 06:48
@@ -111,6 +111,14 @@ func (scanner *Scanner) checkRangeIgnored(id string, r block.Range, b block.Rang
}

// check the line above the block
if r.StartLine-1 > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this block already exists below 🤔

Copy link
Contributor

Choose a reason for hiding this comment

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

Nope, I can't read

liamg
liamg previously approved these changes Jun 11, 2021
- take the range details from the resource block rather than the result
block

- add a check for someone adding the tfsec ignore in about the result
block
@owenrumney
Copy link
Contributor Author

Yup @liamg - that seems to have been unnecessary after all. The key part is the range filename

Copy link
Contributor

@liamg liamg left a comment

Choose a reason for hiding this comment

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

Ah I see!

@owenrumney owenrumney merged commit d4ddd6e into master Jun 11, 2021
@owenrumney owenrumney deleted the owen-tidy-ignore-check branch June 11, 2021 07:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants