Fix `<dispatcher>` substitution for events: `dogma.EventRecorder` no longer exists
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1
- Forks
- 1
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
In internal/inflect/inflect.go, the <dispatcher> placeholder for message.EventKind is substituted with dogma.EventRecorder:
message.EventKind: {
// ...
"<dispatcher>": "dogma.EventRecorder",
},
dogma.EventRecorder was removed in a prior release (see CHANGELOG). This means error messages and suggestions that use <dispatcher> in an event context — such as the hint in expectation.messagecommon.go:
s.AppendListItem(inflect.Sprint(t.kind, "verify the logic within the code that uses the <dispatcher>"))
…will render stale/incorrect interface names to the user.
The substitution should be updated to reflect the current Dogma API. The test files expectation.message.eventcall_test.go and expectation.messagetype.eventcall_test.go also hardcode dogma.EventRecorder in expected output and will need updating.
Also, action.call.go references dogma.EventRecorder in a doc comment (lines 13 and 21) and should be corrected.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in internal/inflect/inflect.go and inspect the event substitution for the placeholder. Update the expected output in expectation.message.eventcall_test.go and expectation.messagetype.eventcall_test.go, then correct the dogma.EventRecorder references in action.call.go's doc comments. Run the affected tests and confirm no stale interface name remains.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 84/100