horizoncd/horizon

View on GitHub
pkg/pr/service/service.go

Summary

Maintainability
A
1 hr
Test Coverage

Method service.GetCheckByResource has 52 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (s *service) GetCheckByResource(ctx context.Context, resourceID uint,
    resourceType string) ([]*models.Check, error) {
    var (
        id      = resourceID
        app     *amodels.Application
Severity: Minor
Found in pkg/pr/service/service.go - About 1 hr to fix

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

    func (s *service) GetCheckByResource(ctx context.Context, resourceID uint,
        resourceType string) ([]*models.Check, error) {
        var (
            id      = resourceID
            app     *amodels.Application
    Severity: Major
    Found in pkg/pr/service/service.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status