SimonBaeumer/goss

View on GitHub

Showing 58 of 157 total issues

Method HTTPMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
Open

func (ret *HTTPMap) UnmarshalJSON(data []byte) error {
    // Curried json.Unmarshal
    unmarshal := func(i interface{}) error {
        if err := json.Unmarshal(data, i); err != nil {
            return err
Severity: Major
Found in resource/resource_list.go - About 45 mins to fix

    Method FileMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
    Open

    func (ret *FileMap) UnmarshalJSON(data []byte) error {
        // Curried json.Unmarshal
        unmarshal := func(i interface{}) error {
            if err := json.Unmarshal(data, i); err != nil {
                return err
    Severity: Major
    Found in resource/resource_list.go - About 45 mins to fix

      Method PortMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
      Open

      func (ret *PortMap) UnmarshalJSON(data []byte) error {
          // Curried json.Unmarshal
          unmarshal := func(i interface{}) error {
              if err := json.Unmarshal(data, i); err != nil {
                  return err
      Severity: Major
      Found in resource/resource_list.go - About 45 mins to fix

        Method KernelParamMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
        Open

        func (ret *KernelParamMap) UnmarshalJSON(data []byte) error {
            // Curried json.Unmarshal
            unmarshal := func(i interface{}) error {
                if err := json.Unmarshal(data, i); err != nil {
                    return err
        Severity: Major
        Found in resource/resource_list.go - About 45 mins to fix

          Method PackageMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
          Open

          func (ret *PackageMap) UnmarshalJSON(data []byte) error {
              // Curried json.Unmarshal
              unmarshal := func(i interface{}) error {
                  if err := json.Unmarshal(data, i); err != nil {
                      return err
          Severity: Major
          Found in resource/resource_list.go - About 45 mins to fix

            Method DNSMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
            Open

            func (ret *DNSMap) UnmarshalJSON(data []byte) error {
                // Curried json.Unmarshal
                unmarshal := func(i interface{}) error {
                    if err := json.Unmarshal(data, i); err != nil {
                        return err
            Severity: Major
            Found in resource/resource_list.go - About 45 mins to fix

              Method MatchingMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
              Open

              func (ret *MatchingMap) UnmarshalJSON(data []byte) error {
                  // Curried json.Unmarshal
                  unmarshal := func(i interface{}) error {
                      if err := json.Unmarshal(data, i); err != nil {
                          return err
              Severity: Major
              Found in resource/matching.go - About 45 mins to fix

                Method ResourceTypeMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
                Open

                func (ret *ResourceTypeMap) UnmarshalJSON(data []byte) error {
                    // Curried json.Unmarshal
                    unmarshal := func(i interface{}) error {
                        if err := json.Unmarshal(data, i); err != nil {
                            return err
                Severity: Major
                Found in resource/resource_list_genny.go - About 45 mins to fix

                  Method AddrMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
                  Open

                  func (ret *AddrMap) UnmarshalJSON(data []byte) error {
                      // Curried json.Unmarshal
                      unmarshal := func(i interface{}) error {
                          if err := json.Unmarshal(data, i); err != nil {
                              return err
                  Severity: Major
                  Found in resource/resource_list.go - About 45 mins to fix

                    Method ProcessMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
                    Open

                    func (ret *ProcessMap) UnmarshalJSON(data []byte) error {
                        // Curried json.Unmarshal
                        unmarshal := func(i interface{}) error {
                            if err := json.Unmarshal(data, i); err != nil {
                                return err
                    Severity: Major
                    Found in resource/resource_list.go - About 45 mins to fix

                      Method GossfileMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
                      Open

                      func (ret *GossfileMap) UnmarshalJSON(data []byte) error {
                          // Curried json.Unmarshal
                          unmarshal := func(i interface{}) error {
                              if err := json.Unmarshal(data, i); err != nil {
                                  return err
                      Severity: Major
                      Found in resource/resource_list.go - About 45 mins to fix

                        Method ServiceMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
                        Open

                        func (ret *ServiceMap) UnmarshalJSON(data []byte) error {
                            // Curried json.Unmarshal
                            unmarshal := func(i interface{}) error {
                                if err := json.Unmarshal(data, i); err != nil {
                                    return err
                        Severity: Major
                        Found in resource/resource_list.go - About 45 mins to fix

                          Method InterfaceMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
                          Open

                          func (ret *InterfaceMap) UnmarshalJSON(data []byte) error {
                              // Curried json.Unmarshal
                              unmarshal := func(i interface{}) error {
                                  if err := json.Unmarshal(data, i); err != nil {
                                      return err
                          Severity: Major
                          Found in resource/resource_list.go - About 45 mins to fix

                            Method GroupMap.UnmarshalJSON has 7 return statements (exceeds 4 allowed).
                            Open

                            func (ret *GroupMap) UnmarshalJSON(data []byte) error {
                                // Curried json.Unmarshal
                                unmarshal := func(i interface{}) error {
                                    if err := json.Unmarshal(data, i); err != nil {
                                        return err
                            Severity: Major
                            Found in resource/resource_list.go - About 45 mins to fix

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

                              func lookupUserGroups(userS user.User) ([]user.Group, error) {
                                  // Get operating system-specific group reader-closer.
                                  group, err := user.GetGroup()
                                  if err != nil {
                                      return []user.Group{user.Group{}}, err
                              Severity: Major
                              Found in system/user.go - About 40 mins to fix

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

                                func DetectDistro() string {
                                    if b, e := ioutil.ReadFile("/etc/lsb-release"); e == nil && bytes.Contains(b, []byte("Ubuntu")) {
                                        return "ubuntu"
                                    } else if isRedhat() {
                                        return "redhat"
                                Severity: Major
                                Found in system/system.go - About 40 mins to fix

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

                                  func ValidateContains(res ResourceRead, property string, expectedValues []string, method func() (io.Reader, error), skip bool) TestResult {
                                      format.TruncatedDiff = false
                                      id := res.ID()
                                      title := res.GetTitle()
                                      meta := res.GetMeta()
                                  Severity: Major
                                  Found in resource/validate.go - About 40 mins to fix

                                    Function ValidateContains has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    func ValidateContains(res ResourceRead, property string, expectedValues []string, method func() (io.Reader, error), skip bool) TestResult {
                                    Severity: Minor
                                    Found in resource/validate.go - About 35 mins to fix

                                      Function ValidateValue has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      func ValidateValue(res ResourceRead, property string, expectedValue interface{}, actual interface{}, skip bool) TestResult {
                                      Severity: Minor
                                      Found in resource/validate.go - About 35 mins to fix

                                        Function validateHeader has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        func validateHeader(res ResourceRead, property string, expectedHeaders map[string][]string, actualHeaders system.Header, skip bool) TestResult {
                                        Severity: Minor
                                        Found in resource/http.go - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language