old_mixer_repo
old_mixer_repo copied to clipboard
Create a custom linter for //adapter code.
We've created a framework with a lot of assumptions for adapter authors; things that are common patterns in go we don't actually want our adapter authors doing. We should look in to writing a custom linter that calls out anti-patterns in adapter code. Specifically, we should check for things like:
- Using
go func() {...}rather thanEnv.ScheduleWorkandEnv.ScheduleDaemon - Using
glograther thanEnv.Logger - Use
adapter.ConfigErrorsfor validation errors rather thanerrors.Newor similar.
All of these patterns must also be documented in our adapter authors guide.
Jury is still out on adapter.ConfigErrors, but in general I think this would be useful.