mgcrea/angular-strap

View on GitHub

Showing 88 of 611 total issues

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

        $timepicker.$onKeyDown = function (evt) {
          if (!/(38|37|39|40|13)/.test(evt.keyCode) || evt.shiftKey || evt.altKey) return;
          evt.preventDefault();
          evt.stopPropagation();

Severity: Minor
Found in src/timepicker/timepicker.js - About 1 hr to fix

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

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

        // Directive options
        var options = {scope: scope, element: element, show: false};
        angular.forEach(['template', 'templateUrl', 'controller', 'controllerAs', 'contentTemplate', 'placement', 'backdrop', 'keyboard', 'html', 'container', 'animation', 'backdropAnimation', 'id', 'prefixEvent', 'prefixClass', 'customClass', 'modalClass', 'size', 'zIndex'], function (key) {
Severity: Minor
Found in src/modal/modal.js - About 1 hr to fix

Function setOffset has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    fn.setOffset = function (element, options, i) {
      var curPosition;
      var curLeft;
      var curCSSTop;
      var curTop;
Severity: Minor
Found in src/helpers/dimensions.js - About 1 hr to fix

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

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

        // Directive options
        var options = {scope: scope, element: element, show: false};
        angular.forEach(['template', 'templateUrl', 'controller', 'controllerAs', 'placement', 'keyboard', 'html', 'container', 'animation', 'duration', 'dismissable'], function (key) {
Severity: Minor
Found in src/alert/alert.js - About 1 hr to fix

Function checkPosition has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        $affix.checkPosition = function () {
          // if (!this.$element.is(':visible')) return

          var scrollTop = getScrollTop();
          var position = dimensions.offset(element[0]);
Severity: Minor
Found in src/affix/affix.js - About 1 hr to fix

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

        return function postLink (scope, element, attr) {

          // Directive options
          var options = {
            scope: scope
Severity: Minor
Found in src/dropdown/dropdown.js - About 1 hr to fix

Function applyPlacement has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        function applyPlacement (offset, placement) {
          var tip = tipElement[0];
          var width = tip.offsetWidth;
          var height = tip.offsetHeight;

Severity: Minor
Found in src/tooltip/tooltip.js - About 1 hr to fix

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

      link: function postLink (scope, element, attr, transclusion) {
        // Directive options
        var options = {scope: scope, element: element, show: false};
        angular.forEach(['template', 'templateUrl', 'controller', 'controllerAs', 'contentTemplate', 'placement', 'backdrop', 'keyboard', 'html', 'container', 'animation'], function (key) {
          if (angular.isDefined(attr[key])) options[key] = attr[key];
Severity: Minor
Found in src/aside/aside.js - About 1 hr to fix

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

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

        var options = defaults;

        // Support label > input[type="checkbox"]
Severity: Minor
Found in src/button/button.js - About 1 hr to fix

Function $get has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

    this.$get = function ($window, $rootScope, $bsCompiler, $q, $templateCache, $http, $animate, $sce, dimensions, $$rAF, $timeout) {
Severity: Major
Found in src/tooltip/tooltip.js - About 1 hr to fix

Function $parseOffsets has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        $affix.$parseOffsets = function () {
          var initialPosition = element[0].style.position;
          var initialTop = element[0].style.top;
          // Reset position to calculate correct offsetTop
          if (options.inlineStyles) {
Severity: Minor
Found in src/affix/affix.js - About 1 hr to fix

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

        $tooltip.$applyPlacement = function () {
          if (!tipElement) return;

          // Determine if we're doing an auto or normal placement
          var placement = options.placement;
Severity: Minor
Found in src/tooltip/tooltip.js - About 1 hr to fix

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

        $tooltip.init = function () {

          // Options: delay
          if (options.delay && angular.isNumber(options.delay)) {
            options.delay = {
Severity: Minor
Found in src/tooltip/tooltip.js - About 1 hr to fix

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

      link: function postLink (scope, element, attrs, controllers) {

        // var ngModelCtrl = controllers[0];
        var bsCollapseCtrl = controllers[1];

Severity: Minor
Found in src/collapse/collapse.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

if (angular.version.minor < 3 && angular.version.dot < 14) {
  angular.module('ng')

  .factory('$$rAF', function ($window, $timeout) {

Severity: Major
Found in src/helpers/raf.js - About 1 hr to fix

Function $get has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

    this.$get = function ($window, $document, $rootScope, $sce, $dateFormatter, datepickerViews, $tooltip, $timeout) {
Severity: Major
Found in src/datepicker/datepicker.js - About 1 hr to fix

Function $get has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    this.$get = function ($window, $document, $rootScope, $sce, $dateFormatter, $tooltip, $timeout) {
Severity: Major
Found in src/timepicker/timepicker.js - About 50 mins to fix

Function $get has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    this.$get = function ($window, $rootScope, $bsCompiler, $animate, $timeout, $sce, dimensions) {
Severity: Major
Found in src/modal/modal.js - About 50 mins to fix

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

function bsCompilerService ($q, $http, $injector, $compile, $controller, $templateCache) {
Severity: Minor
Found in src/helpers/compiler.js - About 45 mins to fix

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

    this.$get = function ($window, $document, $rootScope, dimensions, debounce, throttle) {
Severity: Minor
Found in src/scrollspy/scrollspy.js - About 45 mins to fix
Severity
Category
Status
Source
Language