horizoncd/horizon

View on GitHub
pkg/environment/models/environment.go

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Method EnvironmentList.Less has 5 return statements (exceeds 4 allowed).
Open

func (e EnvironmentList) Less(i, j int) bool {
const pre = "pre"
const online = "online"
if e[i].Name == online {
return false
Severity: Major
Found in pkg/environment/models/environment.go - About 35 mins to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (e EnvironmentList) Less(i, j int) bool {
    const pre = "pre"
    const online = "online"
    if e[i].Name == online {
    return false
    Severity: Major
    Found in pkg/environment/models/environment.go and 1 other location - About 1 hr to fix
    core/controller/applicationregion/models.go on lines 69..85
    Category
    Status