dfcreative/gauge

View on GitHub

Showing 8 of 28 total issues

Function 1 has 155 lines of code (exceeds 25 allowed). Consider refactoring.
Open

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Gauge=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
/**
 * Simple gauge indicator.
 *
 * @module  gauge
Severity: Major
Found in gauge.dev.js - About 6 hrs to fix

    Function 2 has 72 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    },{"component-emitter":2,"mucss/css":3,"xtend/mutable":6}],2:[function(require,module,exports){
    
    /**
     * Expose `Emitter`.
     */
    Severity: Major
    Found in gauge.dev.js - About 2 hrs to fix

      File gauge.dev.js has 286 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.Gauge=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
      /**
       * Simple gauge indicator.
       *
       * @module  gauge
      Severity: Minor
      Found in gauge.dev.js - About 2 hrs to fix

        Function update has 41 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        proto.update = function(){
            var w = this.el.clientWidth, h = this.el.clientHeight;
            var cw = this.colorsEl.clientWidth || w, ch = this.colorsEl.clientHeight || h;
        
            //1. Update colors
        Severity: Minor
        Found in gauge.dev.js - About 1 hr to fix

          Function update has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          proto.update = function(){
              var w = this.el.clientWidth, h = this.el.clientHeight;
              var cw = this.colorsEl.clientWidth || w, ch = this.colorsEl.clientHeight || h;
          
              //1. Update colors
          Severity: Minor
          Found in index.js - About 1 hr to fix

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

            },{}],3:[function(require,module,exports){
            var fakeStyle = require('./fake-element').style;
            var prefix = require('./prefix').dom;
            
            /**
            Severity: Minor
            Found in gauge.dev.js - About 1 hr to fix

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

              function Gauge(el, options) {
                  //ensure proper el is passed
                  if (!(el instanceof HTMLElement)) throw Error('Bad target element');
              
                  //ensure instance
              Severity: Minor
              Found in gauge.dev.js - About 1 hr to fix

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

                function Gauge(el, options) {
                    //ensure proper el is passed
                    if (!(el instanceof HTMLElement)) throw Error('Bad target element');
                
                    //ensure instance
                Severity: Minor
                Found in index.js - About 1 hr to fix
                  Severity
                  Category
                  Status
                  Source
                  Language