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 than Env.ScheduleWork and Env.ScheduleDaemon
Using glog rather than Env.Logger
Use adapter.ConfigErrors for validation errors rather than errors.New or similar.
All of these patterns must also be documented in our adapter authors guide.
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:
go func() {...}
rather thanEnv.ScheduleWork
andEnv.ScheduleDaemon
glog
rather thanEnv.Logger
adapter.ConfigErrors
for validation errors rather thanerrors.New
or similar.All of these patterns must also be documented in our adapter authors guide.