generationtux/brizo

View on GitHub

Showing 11 of 53 total issues

Function AuthGithubCallbackHandler has 79 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func AuthGithubCallbackHandler(w http.ResponseWriter, r *http.Request) {
    auth.HydrateOAuthConfig(oauthConf)
    oAuthCallbackForm := new(auth.OAuthCallbackForm)
    errs := binding.Bind(r, oAuthCallbackForm)
    if errs.Len() > 0 {
Severity: Major
Found in app/handlers/web/auth.go - About 2 hrs to fix

    Function VersionCreate has 74 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func VersionCreate(w http.ResponseWriter, r *http.Request) {
        var createForm struct {
            Name       string                `json:"name"`
            Replicas   int                   `json:"replicas"`
            Containers []resources.Container `json:"containers"`
    Severity: Minor
    Found in app/handlers/api/versions.go - About 1 hr to fix

      Function createContainerSpec has 58 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func createContainerSpec(container Container, environmentUUID string, version *Version) v1.Container {
          policy := v1.PullAlways
          if !container.AlwaysPull {
              policy = v1.PullIfNotPresent
          }
      Severity: Minor
      Found in resources/version.go - About 1 hr to fix

        Function versionDeploymentDefinition has 52 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func versionDeploymentDefinition(version *Version) *v1beta1.Deployment {
            replicas := int32(version.Replicas)
            name := fmt.Sprintf(
                "%v-%v",
                version.Environment.Application.Slug,
        Severity: Minor
        Found in resources/version.go - About 1 hr to fix

          Function exports has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function (config) {
            var _config = {
              basePath: '',
          
              frameworks: ['jasmine'],
          Severity: Minor
          Found in ui/config/karma.conf.js - About 1 hr to fix

            Function AuthGithubCallbackHandler has 10 return statements (exceeds 4 allowed).
            Open

            func AuthGithubCallbackHandler(w http.ResponseWriter, r *http.Request) {
                auth.HydrateOAuthConfig(oauthConf)
                oAuthCallbackForm := new(auth.OAuthCallbackForm)
                errs := binding.Bind(r, oAuthCallbackForm)
                if errs.Len() > 0 {
            Severity: Major
            Found in app/handlers/web/auth.go - About 1 hr to fix

              Function EnvironmentDeploy has 7 return statements (exceeds 4 allowed).
              Open

              func EnvironmentDeploy(w http.ResponseWriter, r *http.Request) {
                  var deployForm struct {
                      // id of the Version we want to deploy
                      VersionUUID string `json:"version_uuid"`
                  }
              Severity: Major
              Found in app/handlers/api/environments.go - About 45 mins to fix

                Function VersionCreate has 7 return statements (exceeds 4 allowed).
                Open

                func VersionCreate(w http.ResponseWriter, r *http.Request) {
                    var createForm struct {
                        Name       string                `json:"name"`
                        Replicas   int                   `json:"replicas"`
                        Containers []resources.Container `json:"containers"`
                Severity: Major
                Found in app/handlers/api/versions.go - About 45 mins to fix

                  Function EnvironmentPromote has 7 return statements (exceeds 4 allowed).
                  Open

                  func EnvironmentPromote(w http.ResponseWriter, r *http.Request) {
                      db, err := database.Connect()
                      defer db.Close()
                      if err != nil {
                          jsonutil.DatabaseConnectError().Render(w)
                  Severity: Major
                  Found in app/handlers/api/environments.go - About 45 mins to fix

                    Function ApplicationUpdate has 6 return statements (exceeds 4 allowed).
                    Open

                    func ApplicationUpdate(w http.ResponseWriter, r *http.Request) {
                        db, err := database.Connect()
                        defer db.Close()
                        if err != nil {
                            jsonutil.DatabaseConnectError().Render(w)
                    Severity: Major
                    Found in app/handlers/api/applications.go - About 40 mins to fix

                      Function EnvironmentCreate has 5 return statements (exceeds 4 allowed).
                      Open

                      func EnvironmentCreate(w http.ResponseWriter, r *http.Request) {
                          client, err := kube.New()
                          if err != nil {
                              jsonutil.KubeClientConnectionError().Render(w)
                              return
                      Severity: Major
                      Found in app/handlers/api/environments.go - About 35 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language