Skip to content

simplify the FunctionalOptions by removing the Options struct #20

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 7 commits into from
Apr 9, 2025

Conversation

robbyt
Copy link
Owner

@robbyt robbyt commented Apr 9, 2025

No description provided.

@robbyt robbyt requested a review from Copilot April 9, 2025 05:39
Copy link

github-actions bot commented Apr 9, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

machines/extism/compiler/options.go:114

  • Directly comparing an atomic.Value with its zero value may be unreliable. Consider using a dedicated flag or checking if c.entryPointName.Load() returns nil for proper initialization.
if c.entryPointName == (atomic.Value{}) {

@robbyt robbyt requested a review from Copilot April 9, 2025 05:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

machines/extism/compiler/compiler.go:137

  • The removal of atomic.Value for entryPointName means that if this field may be updated concurrently after initialization, it could lead to data races. Consider using a concurrency-safe mechanism (such as sync/atomic or mutex protection) if concurrent modifications are expected.
func (c *Compiler) SetEntryPointName(fName string) { c.entryPointName = fName }

Copy link

sonarqubecloud bot commented Apr 9, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
12.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@robbyt robbyt merged commit 8f35742 into main Apr 9, 2025
4 of 5 checks passed
@robbyt robbyt deleted the rterhaar/options-simplify branch April 9, 2025 19:24
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.

1 participant