Context
Follow-up from PR #7053 review. Parent tracking issue: #7112
PR Conversations
What needs to change
- Multiple diagnostics: Allow validation functions to return a slice of results so expensive analysis can produce multiple findings per rule.
- Separate files: Move validation rule implementations out of
bicep_provider.go into their own files (possibly a nested folder) to keep BicepProvider clean.
- Lazy preprocessing: Move role assignment analysis and similar preprocessing into the individual rules that need them instead of doing it globally. Consider an annotation/caching pattern (
HasRoleAssignments(resource) caching results in annotations map).
- Revisit after adding more rules to validate the approach.
Files to update
cli/azd/pkg/infra/provisioning/bicep/bicep_provider.go
cli/azd/pkg/infra/provisioning/bicep/local_preflight.go
Context
Follow-up from PR #7053 review. Parent tracking issue: #7112
PR Conversations
What needs to change
bicep_provider.gointo their own files (possibly a nested folder) to keepBicepProviderclean.HasRoleAssignments(resource)caching results in annotations map).Files to update
cli/azd/pkg/infra/provisioning/bicep/bicep_provider.gocli/azd/pkg/infra/provisioning/bicep/local_preflight.go