horizoncd/horizon

View on GitHub
core/controller/access/controller.go

Summary

Maintainability
A
1 hr
Test Coverage
C
78%

Showing 2 of 2 total issues

Method controller.Review has 51 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (c *controller) Review(ctx context.Context, apis []API) (map[string]map[string]*ReviewResult, error) {
reviewResponse := make(map[string]map[string]*ReviewResult)
// get user info
currentUser, err := common.UserFromContext(ctx)
if err != nil {
Severity: Minor
Found in core/controller/access/controller.go - About 1 hr to fix

    Method controller.Review has 5 return statements (exceeds 4 allowed).
    Open

    func (c *controller) Review(ctx context.Context, apis []API) (map[string]map[string]*ReviewResult, error) {
    reviewResponse := make(map[string]map[string]*ReviewResult)
    // get user info
    currentUser, err := common.UserFromContext(ctx)
    if err != nil {
    Severity: Major
    Found in core/controller/access/controller.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status