Showing 3 of 5 total issues
Function main
has 68 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func main() {
var cfg config.Config
err := env.Parse(&cfg)
if err != nil {
panic(err)
Method Runner.runPlugin
has 6 return statements (exceeds 4 allowed). Open
Open
func (r *Runner) runPlugin(cp plugin.Plugin, cfg scrapeConfig) (scrape.Statistic, error) {
level.Info(log.With(r.l, "plugin", cp.Info().TechnicalName, "scrape_type", cfg.Type)).Log("msg", "scrape started")
f, err := cp.Run()
if err != nil {
return scrape.Statistic{}, err
Function NewService
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func NewService(l log.Logger, cfg config.Config, sr store.StorageRepository, pr plugin.Repository, r *runner.Runner) *service {