dotcloud/docker

View on GitHub
layer/migration.go

Summary

Maintainability
A
3 hrs
Test Coverage

Method layerStore.RegisterByGraphID has 67 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (ls *layerStore) RegisterByGraphID(graphID string, parent ChainID, diffID DiffID, tarDataFile string, size int64) (Layer, error) {
    // err is used to hold the error which will always trigger
    // cleanup of creates sources but may not be an error returned
    // to the caller (already exists).
    var err error
Severity: Minor
Found in layer/migration.go - About 1 hr to fix

    Method layerStore.RegisterByGraphID has 9 return statements (exceeds 4 allowed).
    Open

    func (ls *layerStore) RegisterByGraphID(graphID string, parent ChainID, diffID DiffID, tarDataFile string, size int64) (Layer, error) {
        // err is used to hold the error which will always trigger
        // cleanup of creates sources but may not be an error returned
        // to the caller (already exists).
        var err error
    Severity: Major
    Found in layer/migration.go - About 55 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

        Method layerStore.ChecksumForGraphID has 5 return statements (exceeds 4 allowed).
        Open

        func (ls *layerStore) ChecksumForGraphID(id, parent, newTarDataPath string) (diffID DiffID, size int64, err error) {
            rawarchive, err := ls.driver.Diff(id, parent)
            if err != nil {
                return
            }
        Severity: Major
        Found in layer/migration.go - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status