mgcrea/angular-strap

View on GitHub

Showing 88 of 611 total issues

File datepicker.spec.js has 1346 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

describe('datepicker', function() {

  var bodyEl = $('body'), sandboxEl;
Severity: Major
Found in src/datepicker/test/datepicker.spec.js - About 3 days to fix

File tooltip.spec.js has 1190 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';
/* global countScopes */

describe('tooltip', function() {

Severity: Major
Found in src/tooltip/test/tooltip.spec.js - About 3 days to fix

File timepicker.spec.js has 1065 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

describe('timepicker', function() {

  var $compile, $templateCache, $animate, $timepicker, dateFilter, scope, sandboxEl, today, $timeout;
Severity: Major
Found in src/timepicker/test/timepicker.spec.js - About 2 days to fix

Function $get has 502 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    this.$get = function ($window, $rootScope, $bsCompiler, $q, $templateCache, $http, $animate, $sce, dimensions, $$rAF, $timeout) {

      var isNative = /(ip[ao]d|iphone|android)/ig.test($window.navigator.userAgent);
      var isTouch = ('createTouch' in $window.document) && isNative;
      var $body = angular.element($window.document);
Severity: Major
Found in src/tooltip/tooltip.js - About 2 days to fix

Function TooltipFactory has 490 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function TooltipFactory (element, config) {

        var $tooltip = {};

        // Common vars
Severity: Major
Found in src/tooltip/tooltip.js - About 2 days to fix

File modal.spec.js has 775 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

describe('modal', function() {

  var bodyEl = $('body'), sandboxEl;
Severity: Major
Found in src/modal/test/modal.spec.js - About 1 day to fix

Function $get has 319 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    this.$get = function ($window, $document, $rootScope, $sce, $dateFormatter, $tooltip, $timeout) {

      var isNative = /(ip[ao]d|iphone|android)/ig.test($window.navigator.userAgent);
      var isTouch = ('createTouch' in $window.document) && isNative;
      if (!defaults.lang) {
Severity: Major
Found in src/timepicker/timepicker.js - About 1 day to fix

Function timepickerFactory has 310 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function timepickerFactory (element, controller, config) {

        var $timepicker = $tooltip(element, angular.extend({}, defaults, config));
        var parentScope = config.scope;
        var options = $timepicker.$options;
Severity: Major
Found in src/timepicker/timepicker.js - About 1 day to fix

Function $get has 297 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    this.$get = function ($window, $rootScope, $bsCompiler, $animate, $timeout, $sce, dimensions) {

      var forEach = angular.forEach;
      var requestAnimationFrame = $window.requestAnimationFrame || $window.setTimeout;
      var bodyElement = angular.element($window.document.body);
Severity: Major
Found in src/modal/modal.js - About 1 day to fix

File typeahead.spec.js has 658 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

describe('typeahead', function () {

  var $compile, $templateCache, $typeahead, scope, sandboxEl, $q, $animate, $timeout, $$rAF;
Severity: Major
Found in src/typeahead/test/typeahead.spec.js - About 1 day to fix

File select.spec.js has 656 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

describe('select', function () {

  var $compile, $templateCache, $select, scope, sandboxEl, $timeout, $animate, $window;
Severity: Major
Found in src/select/test/select.spec.js - About 1 day to fix

File tooltip.js has 635 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

angular.module('mgcrea.ngStrap.tooltip', ['mgcrea.ngStrap.core', 'mgcrea.ngStrap.helpers.dimensions'])

  .provider('$tooltip', function () {
Severity: Major
Found in src/tooltip/tooltip.js - About 1 day to fix

Function ModalFactory has 278 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function ModalFactory (config) {

        var $modal = {};

        // Common vars
Severity: Major
Found in src/modal/modal.js - About 1 day to fix

File popover.spec.js has 580 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

describe('popover', function () {

  var $compile, $templateCache, scope, sandboxEl, $window, $timeout, $popover, $animate;
Severity: Major
Found in src/popover/test/popover.spec.js - About 1 day to fix

File datepicker.js has 549 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

angular.module('mgcrea.ngStrap.datepicker', [
  'mgcrea.ngStrap.helpers.dateParser',
  'mgcrea.ngStrap.helpers.dateFormatter',
Severity: Major
Found in src/datepicker/datepicker.js - About 1 day to fix

Function $get has 208 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    this.$get = function ($window, $document, $rootScope, $tooltip, $timeout) {

      // var bodyEl = angular.element($window.document.body);
      var isNative = /(ip[ao]d|iphone|android)/ig.test($window.navigator.userAgent);
      var isTouch = ('createTouch' in $window.document) && isNative;
Severity: Major
Found in src/select/select.js - About 1 day to fix

Function SelectFactory has 202 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function SelectFactory (element, controller, config) {

        var $select = {};

        // Common vars
Severity: Major
Found in src/select/select.js - About 1 day to fix

Function $get has 201 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  this.$get = function ($locale, dateFilter) {

    var DateParserFactory = function (config) {

      var options = angular.extend({}, defaults, config);
Severity: Major
Found in src/helpers/date-parser.js - About 1 day to fix

Function DateParserFactory has 198 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var DateParserFactory = function (config) {

      var options = angular.extend({}, defaults, config);

      var $dateParser = {};
Severity: Major
Found in src/helpers/date-parser.js - About 7 hrs to fix

File timepicker.js has 481 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

angular.module('mgcrea.ngStrap.timepicker', ['mgcrea.ngStrap.helpers.dateParser', 'mgcrea.ngStrap.helpers.dateFormatter', 'mgcrea.ngStrap.tooltip'])

  .provider('$timepicker', function () {
Severity: Minor
Found in src/timepicker/timepicker.js - About 7 hrs to fix
Severity
Category
Status
Source
Language