mgcrea/angular-strap

View on GitHub

Showing 88 of 611 total issues

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

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

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

Function DatepickerFactory has 174 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function DatepickerFactory (element, controller, config) {

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

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

    this.$get = function ($dateFormatter, $dateParser, $sce) {

      return function (picker) {

        var scope = picker.$scope;
Severity: Major
Found in src/datepicker/datepicker.js - About 6 hrs to fix

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

'use strict';
/* global describe, beforeEach, inject, it, expect, afterEach, spyOn, countScopes */

describe('dropdown', function() {

Severity: Minor
Found in src/dropdown/test/dropdown.spec.js - About 6 hrs to fix

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

    this.$get = function ($window, debounce, dimensions) {

      var documentEl = angular.element($window.document);
      var windowEl = angular.element($window);

Severity: Major
Found in src/affix/affix.js - About 5 hrs to fix

File date-parser.spec.js has 405 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';
/* global describe, beforeEach, inject, it, expect */

describe('dateParser', function() {

Severity: Minor
Found in src/helpers/test/date-parser.spec.js - About 5 hrs to fix

Function AffixFactory has 139 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function AffixFactory (element, config) {

        var $affix = {};

        // Common vars
Severity: Major
Found in src/affix/affix.js - About 5 hrs to fix

Function postLink has 132 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      link: function postLink (scope, element, attr, controller) {

        // Directive options
        var options = {scope: scope};
        angular.forEach(['template', 'templateUrl', 'controller', 'controllerAs', 'placement', 'container', 'delay', 'trigger', 'html', 'animation', 'autoclose', 'dateType', 'dateFormat', 'timezone', 'modelDateFormat', 'dayFormat', 'strictFormat', 'startWeek', 'startDate', 'useNative', 'lang', 'startView', 'minView', 'iconLeft', 'iconRight', 'daysOfWeekDisabled', 'id', 'prefixClass', 'prefixEvent', 'hasToday', 'hasClear'], function (key) {
Severity: Major
Found in src/datepicker/datepicker.js - About 5 hrs to fix

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

    this.$get = function ($window, $document, $rootScope, dimensions, debounce, throttle) {

      var windowEl = angular.element($window);
      var docEl = angular.element($document.prop('documentElement'));
      var bodyEl = angular.element($window.document.body);
Severity: Major
Found in src/scrollspy/scrollspy.js - About 5 hrs to fix

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

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

      function TypeaheadFactory (element, controller, config) {

        var $typeahead = {};
Severity: Major
Found in src/typeahead/typeahead.js - About 5 hrs to fix

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

'use strict';

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

  .provider('$modal', function () {
Severity: Minor
Found in src/modal/modal.js - About 5 hrs to fix

Function ScrollSpyFactory has 121 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function ScrollSpyFactory (config) {

        // Common vars
        var options = angular.extend({}, defaults, config);
        if (!options.element) options.element = bodyEl;
Severity: Major
Found in src/scrollspy/scrollspy.js - About 4 hrs to fix

Function TypeaheadFactory has 119 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      function TypeaheadFactory (element, controller, config) {

        var $typeahead = {};

        // Common vars
Severity: Major
Found in src/typeahead/typeahead.js - About 4 hrs to fix

Function postLink has 118 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      link: function postLink (scope, element, attr, controller) {

        // Directive options
        var options = {
          scope: scope
Severity: Major
Found in src/timepicker/timepicker.js - About 4 hrs to fix

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

'use strict';

angular.module('mgcrea.ngStrap.select', ['mgcrea.ngStrap.tooltip', 'mgcrea.ngStrap.helpers.parseOptions'])

  .provider('$select', function () {
Severity: Minor
Found in src/select/select.js - About 3 hrs to fix

Function postLink has 92 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      link: function postLink (scope, element, attr, transclusion) {

        var tooltip;
        // Directive options
        var options = {scope: scope};
Severity: Major
Found in src/tooltip/tooltip.js - About 3 hrs to fix

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

'use strict';

describe('aside', function () {

  var $compile, $templateCache, scope, sandboxEl, $animate, $timeout, $aside;
Severity: Minor
Found in src/aside/test/aside.spec.js - About 3 hrs to fix

Function bsCompilerService has 90 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function bsCompilerService ($q, $http, $injector, $compile, $controller, $templateCache) {

  /*
   * @ngdoc service
   * @name $bsCompiler
Severity: Major
Found in src/helpers/compiler.js - About 3 hrs to fix

Function postLink has 83 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      link: function postLink (scope, element, attr) {

        var popover;
        // Directive options
        var options = {scope: scope};
Severity: Major
Found in src/popover/popover.js - About 3 hrs to fix

Function controller has 83 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    var controller = this.controller = function ($scope, $element, $attrs) {
      var self = this;

      // Attributes options
      self.$options = angular.copy(defaults);
Severity: Major
Found in src/collapse/collapse.js - About 3 hrs to fix
Severity
Category
Status
Source
Language