dotcloud/docker

View on GitHub

Showing 1,904 of 1,904 total issues

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

func buildCreateEndpointOptions(c *container.Container, n *libnetwork.Network, epConfig *network.EndpointSettings, sb *libnetwork.Sandbox, daemonDNS []string) ([]libnetwork.EndpointOption, error) {
Severity: Minor
Found in daemon/network.go - About 35 mins to fix

    Method Daemon.logClusterEvent has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    func (daemon *Daemon) logClusterEvent(action swarmapi.WatchActionKind, id string, eventType events.Type, eventTime time.Time, attributes map[string]string) {
    Severity: Minor
    Found in daemon/events.go - About 35 mins to fix

      Method ImageService.pullForBuilder has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      func (i *ImageService) pullForBuilder(ctx context.Context, name string, authConfigs map[string]registry.AuthConfig, output io.Writer, platform *ocispec.Platform) (*image.Image, error) {
      Severity: Minor
      Found in daemon/images/image_builder.go - About 35 mins to fix

        Method Daemon.ContainerAttachRaw has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        func (daemon *Daemon) ContainerAttachRaw(prefixOrName string, stdin io.ReadCloser, stdout, stderr io.Writer, doStream bool, attached chan struct{}) error {
        Severity: Minor
        Found in daemon/attach.go - About 35 mins to fix

          Method ImageService.PrepareSnapshot has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          func (i *ImageService) PrepareSnapshot(ctx context.Context, id string, parentImage string, platform *ocispec.Platform, setupInit func(string) error) error {
          Severity: Minor
          Found in daemon/images/image.go - About 35 mins to fix

            Method ImageService.LoadImage has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            func (i *ImageService) LoadImage(ctx context.Context, inTar io.ReadCloser, platform *ocispec.Platform, outStream io.Writer, quiet bool) error {
            Severity: Minor
            Found in daemon/images/image_exporter.go - About 35 mins to fix

              Method layerStore.RegisterByGraphID has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              func (ls *layerStore) RegisterByGraphID(graphID string, parent ChainID, diffID DiffID, tarDataFile string, size int64) (Layer, error) {
              Severity: Minor
              Found in layer/migration.go - About 35 mins to fix

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

                func deleteAllNetworks(ctx context.Context, t testing.TB, c client.NetworkAPIClient, daemonPlatform string, protectedNetworks map[string]struct{}) {
                Severity: Minor
                Found in testutil/environment/clean.go - About 35 mins to fix

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

                  func DisplayJSONMessagesStream(in io.Reader, out io.Writer, terminalFd uintptr, isTerminal bool, auxCallback func(JSONMessage)) error {
                  Severity: Minor
                  Found in pkg/jsonmessage/jsonmessage.go - About 35 mins to fix

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                    func encodeVarintAgent(dAtA []byte, offset int, v uint64) int {
                        offset -= sovAgent(v)
                        base := offset
                        for v >= 1<<7 {
                            dAtA[offset] = uint8(v&0x7f | 0x80)
                    Severity: Major
                    Found in libnetwork/agent.pb.go and 4 other locations - About 35 mins to fix
                    api/types/plugins/logdriver/entry.pb.go on lines 297..307
                    api/types/swarm/runtime/plugin.pb.go on lines 307..317
                    libnetwork/drivers/overlay/overlay.pb.go on lines 185..195
                    libnetwork/networkdb/networkdb.pb.go on lines 1376..1386

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 107.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                    func encodeVarintEntry(dAtA []byte, offset int, v uint64) int {
                        offset -= sovEntry(v)
                        base := offset
                        for v >= 1<<7 {
                            dAtA[offset] = uint8(v&0x7f | 0x80)
                    Severity: Major
                    Found in api/types/plugins/logdriver/entry.pb.go and 4 other locations - About 35 mins to fix
                    api/types/swarm/runtime/plugin.pb.go on lines 307..317
                    libnetwork/agent.pb.go on lines 485..495
                    libnetwork/drivers/overlay/overlay.pb.go on lines 185..195
                    libnetwork/networkdb/networkdb.pb.go on lines 1376..1386

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 107.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                    func encodeVarintPlugin(dAtA []byte, offset int, v uint64) int {
                        offset -= sovPlugin(v)
                        base := offset
                        for v >= 1<<7 {
                            dAtA[offset] = uint8(v&0x7f | 0x80)
                    Severity: Major
                    Found in api/types/swarm/runtime/plugin.pb.go and 4 other locations - About 35 mins to fix
                    api/types/plugins/logdriver/entry.pb.go on lines 297..307
                    libnetwork/agent.pb.go on lines 485..495
                    libnetwork/drivers/overlay/overlay.pb.go on lines 185..195
                    libnetwork/networkdb/networkdb.pb.go on lines 1376..1386

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 107.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                    func encodeVarintOverlay(dAtA []byte, offset int, v uint64) int {
                        offset -= sovOverlay(v)
                        base := offset
                        for v >= 1<<7 {
                            dAtA[offset] = uint8(v&0x7f | 0x80)
                    Severity: Major
                    Found in libnetwork/drivers/overlay/overlay.pb.go and 4 other locations - About 35 mins to fix
                    api/types/plugins/logdriver/entry.pb.go on lines 297..307
                    api/types/swarm/runtime/plugin.pb.go on lines 307..317
                    libnetwork/agent.pb.go on lines 485..495
                    libnetwork/networkdb/networkdb.pb.go on lines 1376..1386

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 107.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                    func encodeVarintNetworkdb(dAtA []byte, offset int, v uint64) int {
                        offset -= sovNetworkdb(v)
                        base := offset
                        for v >= 1<<7 {
                            dAtA[offset] = uint8(v&0x7f | 0x80)
                    Severity: Major
                    Found in libnetwork/networkdb/networkdb.pb.go and 4 other locations - About 35 mins to fix
                    api/types/plugins/logdriver/entry.pb.go on lines 297..307
                    api/types/swarm/runtime/plugin.pb.go on lines 307..317
                    libnetwork/agent.pb.go on lines 485..495
                    libnetwork/drivers/overlay/overlay.pb.go on lines 185..195

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 107.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    func Stat(path string) (*StatT, error) {
                        s := &syscall.Stat_t{}
                        if err := syscall.Stat(path, s); err != nil {
                            return nil, &os.PathError{Op: "Stat", Path: path, Err: err}
                        }
                    Severity: Minor
                    Found in pkg/system/stat_unix.go and 1 other location - About 35 mins to fix
                    pkg/system/lstat_unix.go on lines 14..20

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 107.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    func programChainRule(rule iptRule, ruleDescr string, insert bool) error {
                        operation := "disable"
                        fn := rule.Delete
                        if insert {
                            operation = "enable"
                    Severity: Minor
                    Found in libnetwork/drivers/bridge/setup_ip_tables_linux.go and 1 other location - About 35 mins to fix
                    libnetwork/drivers/bridge/setup_ip_tables_linux.go on lines 328..339

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 107.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    func Lstat(path string) (*StatT, error) {
                        s := &syscall.Stat_t{}
                        if err := syscall.Lstat(path, s); err != nil {
                            return nil, &os.PathError{Op: "Lstat", Path: path, Err: err}
                        }
                    Severity: Minor
                    Found in pkg/system/lstat_unix.go and 1 other location - About 35 mins to fix
                    pkg/system/stat_unix.go on lines 60..66

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 107.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    func appendOrDelChainRule(rule iptRule, ruleDescr string, append bool) error {
                        operation := "disable"
                        fn := rule.Delete
                        if append {
                            operation = "enable"
                    Severity: Minor
                    Found in libnetwork/drivers/bridge/setup_ip_tables_linux.go and 1 other location - About 35 mins to fix
                    libnetwork/drivers/bridge/setup_ip_tables_linux.go on lines 315..326

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 107.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                        if ctr.HostConfig.PortBindings != nil {
                            for p, b := range ctr.HostConfig.PortBindings {
                                bindings[p] = []nat.PortBinding{}
                                for _, bb := range b {
                                    bindings[p] = append(bindings[p], nat.PortBinding{
                    Severity: Minor
                    Found in daemon/container_operations.go and 1 other location - About 35 mins to fix
                    daemon/network.go on lines 933..943

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 106.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                        if create.EnableIPv6 != nil {
                            enableIPv6 = *create.EnableIPv6
                        } else if v, ok := networkOptions[netlabel.EnableIPv6]; ok {
                            var err error
                            if enableIPv6, err = strconv.ParseBool(v); err != nil {
                    Severity: Minor
                    Found in daemon/network.go and 1 other location - About 35 mins to fix
                    daemon/network.go on lines 320..327

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 106.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Severity
                    Category
                    Status
                    Source
                    Language