dewey/feedbridge

View on GitHub

Showing 3 of 5 total issues

Function main has 68 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func main() {
    var cfg config.Config
    err := env.Parse(&cfg)
    if err != nil {
        panic(err)
Severity: Minor
Found in cmd/api/main.go - About 1 hr to fix

    Method Runner.runPlugin has 6 return statements (exceeds 4 allowed).
    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
    Severity: Major
    Found in runner/runner.go - About 40 mins to fix

      Function NewService has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func NewService(l log.Logger, cfg config.Config, sr store.StorageRepository, pr plugin.Repository, r *runner.Runner) *service {
      Severity: Minor
      Found in api/service.go - About 35 mins to fix
        Severity
        Category
        Status
        Source
        Language