Showing 80 of 191 total issues

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

func findSignature(msg *net.Message, meta *object.MetaObject) string {
    if msg.Header.Type == net.Call ||
        msg.Header.Type == net.Post ||
        msg.Header.Type == net.Reply {
        m, ok := meta.Methods[msg.Header.Action]
Severity: Major
Found in bus/object.go - About 40 mins to fix

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

    func generatePropertyDef(file *jen.File, serviceName string,
        property Property, getMethodName, setMethodName,
        subscribeMethodName string, definitions *[]jen.Code) error {
    Severity: Minor
    Found in meta/idl/proxy.go - About 35 mins to fix

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

      func generateMethodDef(file *jen.File, serviceName string,
          method Method, methodName string, definitions *[]jen.Code) error {
      Severity: Minor
      Found in meta/idl/proxy.go - About 35 mins to fix

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

        func NewHeader(typ uint8, service uint32, object uint32, action uint32, id uint32) Header {
        Severity: Minor
        Found in bus/net/message.go - About 35 mins to fix

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

          func generateSignalDef(file *jen.File, serviceName string,
              signal Signal, signalName string, definitions *[]jen.Code) error {
          Severity: Minor
          Found in meta/idl/proxy.go - About 35 mins to fix

            Method proxyALVideoDevice.SubscribeCamera has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            func (p *proxyALVideoDevice) SubscribeCamera(name string, cameraIndex int32, resolution int32, colorSpace int32, fps int32) (string, error) {
            Severity: Minor
            Found in examples/video/video_proxy.go - About 35 mins to fix

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

              func ReadString(r io.Reader) (string, error) {
                  size, err := ReadUint32(r)
                  if err != nil {
                      return "", fmt.Errorf("read string size: %s", err)
                  }
              Severity: Major
              Found in type/basic/basic.go - About 35 mins to fix

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

                func generateStubPropertyCallback(file *jen.File, itf *idl.InterfaceType) error {
                
                    writing := make([]jen.Code, 0)
                
                    method := func(m object.MetaMethod, methodName string) error {
                Severity: Major
                Found in meta/stub/stub.go - About 35 mins to fix

                  Method InterfaceType.registerMembers has 5 return statements (exceeds 4 allowed).
                  Open

                  func (itf *InterfaceType) registerMembers(set *signature.TypeSet) error {
                      metaObj := itf.MetaObject()
                      method := func(m object.MetaMethod, methodName string) error {
                          method := itf.Methods[m.Uid]
                          paramType := method.Tuple()
                  Severity: Major
                  Found in meta/idl/interface.go - About 35 mins to fix

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

                    func NewAuthSession(addr, user, token string) (bus.Session, error) {
                    
                        s := new(Session)
                        s.userName = user
                        s.userToken = token
                    Severity: Major
                    Found in bus/session/session.go - About 35 mins to fix

                      Method MetaObject.PropertyID has 5 return statements (exceeds 4 allowed).
                      Open

                      func (m *MetaObject) PropertyID(name, sig string) (uint32, error) {
                          for _, property := range m.Properties {
                              if property.Name == name &&
                                  property.Signature == sig {
                                  return property.Uid, nil
                      Severity: Major
                      Found in type/object/metaobject_decorator.go - About 35 mins to fix

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

                        func ReadCapabilityMap(in io.Reader) (m CapabilityMap, err error) {
                        
                            size, err := basic.ReadUint32(in)
                            if err != nil {
                                return m, fmt.Errorf("read map size: %s", err)
                        Severity: Major
                        Found in bus/authenticate.go - About 35 mins to fix

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

                          func WriteString(s string, w io.Writer) error {
                              data := []byte(s)
                              size := len(data)
                              if size > int(MaxStringSize) {
                                  return fmt.Errorf("invalid string size: %d", size)
                          Severity: Major
                          Found in type/basic/basic.go - About 35 mins to fix

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

                            func ParsePackage(input []byte) (*PackageDeclaration, error) {
                                context := NewContext()
                                parser := packageParser(context)
                                root, scanner := parser(parsec.NewScanner(input).TrackLineno())
                                _, scanner = scanner.SkipWS()
                            Severity: Major
                            Found in meta/idl/parser.go - About 35 mins to fix

                              Method stubObject.UpdateProperty has 5 return statements (exceeds 4 allowed).
                              Open

                              func (s *stubObject) UpdateProperty(id uint32, sig string, data []byte) error {
                                  objImpl, ok := (s.impl).(*objectImpl)
                                  if !ok {
                                      return fmt.Errorf("unexpected implementation")
                                  }
                              Severity: Major
                              Found in bus/object.go - About 35 mins to fix

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

                                func getCertFiles() (string, string, error) {
                                    filename, err := getCertConf()
                                    if err != nil {
                                        return "", "", err
                                    }
                                Severity: Major
                                Found in bus/net/cert/cert.go - About 35 mins to fix

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

                                  func generateReceiveMethod(file *jen.File, itf *idl.InterfaceType) error {
                                      writing := make([]jen.Code, 0)
                                  
                                      prelude := jen.Comment("action dispatch")
                                      if itf.Name == "Object" {
                                  Severity: Major
                                  Found in meta/stub/stub.go - About 35 mins to fix

                                    Method qiDecoder.readValue has 5 return statements (exceeds 4 allowed).
                                    Open

                                    func (q qiDecoder) readValue(typ reflect.Type) (v reflect.Value, err error) {
                                        if typ.Kind() == reflect.Interface {
                                            // not much we can do here. let's handle the
                                            // special case of value.Value
                                            if typ.Name() == "Value" {
                                    Severity: Major
                                    Found in type/encoding/encoding.go - About 35 mins to fix

                                      Method MetaObject.SignalID has 5 return statements (exceeds 4 allowed).
                                      Open

                                      func (m *MetaObject) SignalID(name, sig string) (uint32, error) {
                                          for _, signal := range m.Signals {
                                              if signal.Name == name &&
                                                  signal.Signature == sig {
                                                  return signal.Uid, nil
                                      Severity: Major
                                      Found in type/object/metaobject_decorator.go - About 35 mins to fix

                                        Method server.NewService has 5 return statements (exceeds 4 allowed).
                                        Open

                                        func (s *server) NewService(name string, object Actor) (Service, error) {
                                        
                                            s.Router.RLock()
                                            session := s.Router.session
                                            s.Router.RUnlock()
                                        Severity: Major
                                        Found in bus/server.go - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language