Skip to content

[FEAT] Example Package for Testing and Documentation#4

Merged
bbengfort merged 1 commit intomainfrom
jen
Apr 4, 2026
Merged

[FEAT] Example Package for Testing and Documentation#4
bbengfort merged 1 commit intomainfrom
jen

Conversation

@bbengfort
Copy link
Copy Markdown
Contributor

@bbengfort bbengfort commented Apr 4, 2026

Scope of changes

Implements an example package that will be used for implementing the generator, testing, and serve as documentation.

Estimated PR Size:

  • Tiny
  • Small
  • Medium
  • Large
  • Huge

Acceptance criteria

This PR will be merged without review.

Author checklist

  • I have manually tested the change and/or added automation in the form of unit tests or integration tests
  • I have updated the dependencies list
  • I have added new test fixtures as needed to support added tests
  • I have added or updated the documentation
  • I have run go generate to update generated code

Note

Low Risk
Low risk: adds an example package and a placeholder cmd/enumify main that only prints environment variables, with no production logic or data handling changes.

Overview
Adds a new example package intended as a fixture for the upcoming enumify generator: two enum types (Day, Status) with go:generate directives and associated name tables, plus an unrelated Example struct and a small test to ensure the package builds.

Replaces cmd/enumify’s empty main with a minimal entrypoint that prints GOFILE/GOPACKAGE from the environment, and updates .gitignore to exclude generated example/*_gen.go files from version control.

Reviewed by Cursor Bugbot for commit 45ed293. Configure here.

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 45ed293. Configure here.


// This is an unrelated test that should be ignored by the enumify generator.
func TestExample(t *testing.T) {
example, err := example.New()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Test variable shadows imported package name

Low Severity

The local example variable shadows the imported example package, making the package inaccessible for further calls within TestExample. This is a confusing anti-pattern, especially in example code, and makes the test fragile if extended.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 45ed293. Configure here.

@bbengfort bbengfort merged commit 35ddb1e into main Apr 4, 2026
7 checks passed
@bbengfort bbengfort deleted the jen branch April 4, 2026 19:08
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