docker/swarmkit

View on GitHub

Showing 1,820 of 1,820 total issues

Function skipCa has 11 return statements (exceeds 4 allowed).
Open

func skipCa(dAtA []byte) (n int, err error) {
    l := len(dAtA)
    iNdEx := 0
    depth := 0
    for iNdEx < l {
Severity: Major
Found in api/ca.pb.go - About 1 hr to fix

    Method Service.MarshalToSizedBuffer has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
    Open

    func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) {
        i := len(dAtA)
        _ = i
        var l int
        _ = l
    Severity: Minor
    Found in api/objects.pb.go - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function ConvertExtensionWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
    Open

    func ConvertExtensionWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
        var (
            m          Extension
            checkFuncs []ExtensionCheckFunc
        )
    Severity: Minor
    Found in api/objects.pb.go - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function ConvertClusterWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
    Open

    func ConvertClusterWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
        var (
            m          Cluster
            checkFuncs []ClusterCheckFunc
        )
    Severity: Minor
    Found in api/objects.pb.go - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function skipResource has 11 return statements (exceeds 4 allowed).
    Open

    func skipResource(dAtA []byte) (n int, err error) {
        l := len(dAtA)
        iNdEx := 0
        depth := 0
        for iNdEx < l {
    Severity: Major
    Found in api/resource.pb.go - About 1 hr to fix

      Function ConvertSecretWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
      Open

      func ConvertSecretWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
          var (
              m          Secret
              checkFuncs []SecretCheckFunc
          )
      Severity: Minor
      Found in api/objects.pb.go - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function ConvertNetworkWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
      Open

      func ConvertNetworkWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
          var (
              m          Network
              checkFuncs []NetworkCheckFunc
          )
      Severity: Minor
      Found in api/objects.pb.go - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function ConvertVolumeWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
      Open

      func ConvertVolumeWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
          var (
              m          Volume
              checkFuncs []VolumeCheckFunc
          )
      Severity: Minor
      Found in api/objects.pb.go - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function ConvertResourceWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
      Open

      func ConvertResourceWatch(action WatchActionKind, filters []*SelectBy, kind string) ([]Event, error) {
          var (
              m          Resource
              checkFuncs []ResourceCheckFunc
          )
      Severity: Minor
      Found in api/objects.pb.go - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function ConvertServiceWatch has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
      Open

      func ConvertServiceWatch(action WatchActionKind, filters []*SelectBy) ([]Event, error) {
          var (
              m          Service
              checkFuncs []ServiceCheckFunc
          )
      Severity: Minor
      Found in api/objects.pb.go - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function skipDispatcher has 11 return statements (exceeds 4 allowed).
      Open

      func skipDispatcher(dAtA []byte) (n int, err error) {
          l := len(dAtA)
          iNdEx := 0
          depth := 0
          for iNdEx < l {
      Severity: Major
      Found in api/dispatcher.pb.go - About 1 hr to fix

        Method StoreSnapshot.MarshalToSizedBuffer has 11 return statements (exceeds 4 allowed).
        Open

        func (m *StoreSnapshot) MarshalToSizedBuffer(dAtA []byte) (int, error) {
            i := len(dAtA)
            _ = i
            var l int
            _ = l
        Severity: Major
        Found in api/snapshot.pb.go - About 1 hr to fix

          Function skipSnapshot has 11 return statements (exceeds 4 allowed).
          Open

          func skipSnapshot(dAtA []byte) (n int, err error) {
              l := len(dAtA)
              iNdEx := 0
              depth := 0
              for iNdEx < l {
          Severity: Major
          Found in api/snapshot.pb.go - About 1 hr to fix

            Function skipObjects has 11 return statements (exceeds 4 allowed).
            Open

            func skipObjects(dAtA []byte) (n int, err error) {
                l := len(dAtA)
                iNdEx := 0
                depth := 0
                for iNdEx < l {
            Severity: Major
            Found in api/objects.pb.go - About 1 hr to fix

              Function skipLogbroker has 11 return statements (exceeds 4 allowed).
              Open

              func skipLogbroker(dAtA []byte) (n int, err error) {
                  l := len(dAtA)
                  iNdEx := 0
                  depth := 0
                  for iNdEx < l {
              Severity: Major
              Found in api/logbroker.pb.go - About 1 hr to fix

                Method ContainerSpec.MarshalToSizedBuffer has 11 return statements (exceeds 4 allowed).
                Open

                func (m *ContainerSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) {
                    i := len(dAtA)
                    _ = i
                    var l int
                    _ = l
                Severity: Major
                Found in api/specs.pb.go - About 1 hr to fix

                  Function skipSpecs has 11 return statements (exceeds 4 allowed).
                  Open

                  func skipSpecs(dAtA []byte) (n int, err error) {
                      l := len(dAtA)
                      iNdEx := 0
                      depth := 0
                      for iNdEx < l {
                  Severity: Major
                  Found in api/specs.pb.go - About 1 hr to fix

                    Function skipWatch has 11 return statements (exceeds 4 allowed).
                    Open

                    func skipWatch(dAtA []byte) (n int, err error) {
                        l := len(dAtA)
                        iNdEx := 0
                        depth := 0
                        for iNdEx < l {
                    Severity: Major
                    Found in api/watch.pb.go - About 1 hr to fix

                      Function skipPlugin has 11 return statements (exceeds 4 allowed).
                      Open

                      func skipPlugin(dAtA []byte) (n int, err error) {
                          l := len(dAtA)
                          iNdEx := 0
                          depth := 0
                          for iNdEx < l {
                      Severity: Major
                      Found in protobuf/plugin/plugin.pb.go - About 1 hr to fix

                        Method Updater.updateTask has 11 return statements (exceeds 4 allowed).
                        Open

                        func (u *Updater) updateTask(ctx context.Context, slot orchestrator.Slot, updated *api.Task, order api.UpdateConfig_UpdateOrder) error {
                            // Kick off the watch before even creating the updated task. This is in order to avoid missing any event.
                            taskUpdates, cancel := state.Watch(u.watchQueue, api.EventUpdateTask{
                                Task:   &api.Task{ID: updated.ID},
                                Checks: []api.TaskCheckFunc{api.TaskCheckID},
                        Severity: Major
                        Found in manager/orchestrator/update/updater.go - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language