horizoncd/horizon

View on GitHub
pkg/grafana/grafana.go

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Method service.sync has 72 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (s *service) sync(ctx context.Context) {
log.Info(ctx, "Start to sync grafana datasource")
 
logErr := func(err error) {
log.Errorf(ctx, "Sync grafana datasource error: %+v", err)
Severity: Minor
Found in pkg/grafana/grafana.go - About 1 hr to fix

    Method service.sync has 5 return statements (exceeds 4 allowed).
    Open

    func (s *service) sync(ctx context.Context) {
    log.Info(ctx, "Start to sync grafana datasource")
     
    logErr := func(err error) {
    log.Errorf(ctx, "Sync grafana datasource error: %+v", err)
    Severity: Major
    Found in pkg/grafana/grafana.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status