old_mixer_repo icon indicating copy to clipboard operation
old_mixer_repo copied to clipboard

Create a custom linter for //adapter code.

Open ZackButcher opened this issue 8 years ago • 1 comments

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.

ZackButcher avatar Mar 24 '17 17:03 ZackButcher

Jury is still out on adapter.ConfigErrors, but in general I think this would be useful.

douglas-reid avatar Mar 24 '17 17:03 douglas-reid