Skip to content

DENA-969: Implemented rule for checking the backend #5

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

Merged
merged 39 commits into from
Oct 3, 2024

Conversation

sbuliarca
Copy link
Contributor

See the rule documentation.

@sbuliarca sbuliarca requested a review from a team as a code owner October 2, 2024 14:17
Copy link

linear bot commented Oct 2, 2024

Base automatically changed from setup-uw-repo to main October 2, 2024 14:43
…end-check

# Conflicts:
#	README.md
#	go.mod
#	go.sum
#	main.go
#	rules/terraform_backend_type.go

// Link returns the rule reference link.
func (r *MskModuleBackendRule) Link() string {
return ""
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be useful to link to this repo/the added README in this directory? (I'm assuming Link is an informative link that shows when the user sees this linter fail)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nice catch. I implemented it here: 788cc41

Based on the reference implementation from here: https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/rules/terraform_comment_syntax.go#L39 , but I dropped the version as that would need constant update, and just used the main blob reference

Comment on lines +83 to +85
if err != nil {
return fmt.Errorf("emitting issue: backend missing: %w", err)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This check looks so odd to me (just a note on the SDK, nothing for us to do): there was an issue running the linter, but we can't show it to you. It would be nice if there was a helper like EmitIssueOrAbort to just end the runner, it's not like there's much we can do to recover 🤷

@sbuliarca sbuliarca merged commit 30fdec9 into main Oct 3, 2024
5 checks passed
@sbuliarca sbuliarca deleted the add-backend-check branch October 3, 2024 08:42
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

Successfully merging this pull request may close these issues.

2 participants