medialize/ally.js

View on GitHub
build/metalsmith/plugins/collection.manual-sort.js

Summary

Maintainability
B
6 hrs
Test Coverage

Function sorter has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function sorter(order) {
  order = order || [];

  return function(one, two) {
    let a = one.sidebar || one.title;
Severity: Minor
Found in build/metalsmith/plugins/collection.manual-sort.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

            return 1;
    Severity: Major
    Found in build/metalsmith/plugins/collection.manual-sort.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return 1;
      Severity: Major
      Found in build/metalsmith/plugins/collection.manual-sort.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

              return 1;
        Severity: Major
        Found in build/metalsmith/plugins/collection.manual-sort.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return 0;
          Severity: Major
          Found in build/metalsmith/plugins/collection.manual-sort.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return -1;
            Severity: Major
            Found in build/metalsmith/plugins/collection.manual-sort.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return 0;
              Severity: Major
              Found in build/metalsmith/plugins/collection.manual-sort.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return -1;
                Severity: Major
                Found in build/metalsmith/plugins/collection.manual-sort.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                        return 1;
                  Severity: Major
                  Found in build/metalsmith/plugins/collection.manual-sort.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          return -1;
                    Severity: Major
                    Found in build/metalsmith/plugins/collection.manual-sort.js - About 30 mins to fix

                      There are no issues that match your filters.

                      Category
                      Status