marionebl/jogwheel

View on GitHub

Showing 30 of 270 total issues

Function list has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    return function list() {
        /* @desc list all public tasks */
        var tasks = Object.keys(gulp.tasks || {})
            .reduce(function (results, taskName) {
                var task = gulp.tasks[taskName];
Severity: Minor
Found in tasks/list.js - About 1 hr to fix

    Function onMatchMedia has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        onMatchMedia() {
            const {
                elements,
                players,
                settings,
    Severity: Minor
    Found in source/library/index.js - About 1 hr to fix

      Function playerStub has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const playerStub = options => {
          const _state = {
              currentTime: 0,
              activeDuration: 0,
              playState: 'running'
      Severity: Minor
      Found in source/test/unit/stubs/player.js - About 1 hr to fix

        Function getPlayer has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function getPlayer(element, settings, window = global.window, document = global.document) {
            // Read all animation related styles from element, respect prefixes
            const {
                name,
                duration,
        Severity: Minor
        Found in source/library/get-player.js - About 1 hr to fix

          Function exports has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function (options) {
              options = Object.assign({}, defaults, options);
          
              return function (err) {
                  if (!err) {
          Severity: Minor
          Found in tasks/helpers/on-error.js - About 1 hr to fix

            Function exports has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            module.exports = function (props) {
                return function (image, headline, navigation) {
                    image = image || {
                        href: props.pkg.homepage,
                        src: props.pkg.logo
            Severity: Minor
            Found in tasks/partials/header.js - About 1 hr to fix

              Function build has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  return function build(done) {
                      return sequence(
                          task(clean),
                          [
                              task(copy),
              Severity: Minor
              Found in tasks/build.js - About 1 hr to fix

                Function initPlayer has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                export default function initPlayer(element, keyframes, options, render, window = global.window, document = global.document) {
                Severity: Minor
                Found in source/library/init-player.js - About 45 mins to fix

                  Function exports has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  module.exports = function (gulp, paths) {
                      const props = {
                          paths: paths,
                          gulp: gulp,
                          pkg: merge({}, pkg, pkg.config.documentation),
                  Severity: Minor
                  Found in tasks/documentation.js - About 35 mins 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 exports has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  module.exports = function (gulp, paths) {
                      'use strict';
                      function toHtml() {
                          const rewrite = function () {
                              return function (ast, file) {
                  Severity: Minor
                  Found in tasks/html.js - About 35 mins 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

                  Severity
                  Category
                  Status
                  Source
                  Language