horizoncd/horizon

View on GitHub
pkg/cluster/metrics/metrics.go

Summary

Maintainability
A
2 hrs
Test Coverage
B
82%

Showing 2 of 2 total issues

Method Collector.getClustersAndApps has 81 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (collector *Collector) getClustersAndApps() ([]*item, []*appWithTags) {
ctx := context.Background()
 
// dummy user
// nolint
Severity: Major
Found in pkg/cluster/metrics/metrics.go - About 2 hrs to fix

    Method Collector.getClustersAndApps has 6 return statements (exceeds 4 allowed).
    Open

    func (collector *Collector) getClustersAndApps() ([]*item, []*appWithTags) {
    ctx := context.Background()
     
    // dummy user
    // nolint
    Severity: Major
    Found in pkg/cluster/metrics/metrics.go - About 40 mins to fix
      Category
      Status