dotcloud/docker

View on GitHub
builder/dockerfile/evaluator.go

Summary

Maintainability
A
2 hrs
Test Coverage

Function dispatch has 64 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func dispatch(ctx context.Context, d dispatchRequest, cmd instructions.Command) (err error) {
    if c, ok := cmd.(instructions.PlatformSpecific); ok {
        err := c.CheckPlatform(d.state.operatingSystem)
        if err != nil {
            return errdefs.InvalidParameter(err)
Severity: Minor
Found in builder/dockerfile/evaluator.go - About 1 hr to fix

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

    func dispatch(ctx context.Context, d dispatchRequest, cmd instructions.Command) (err error) {
        if c, ok := cmd.(instructions.PlatformSpecific); ok {
            err := c.CheckPlatform(d.state.operatingSystem)
            if err != nil {
                return errdefs.InvalidParameter(err)
    Severity: Major
    Found in builder/dockerfile/evaluator.go - About 40 mins to fix

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

      func newDispatchRequest(builder *Builder, escapeToken rune, source builder.Source, buildArgs *BuildArgs, stages *stagesBuildResults) dispatchRequest {
      Severity: Minor
      Found in builder/dockerfile/evaluator.go - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status