Showing 25 of 56 total issues
Function uiTourController
has 300 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function uiTourController($timeout, $q, $filter, $document, TourConfig, uiTourBackdrop, uiTourService, TourStepService, hotkeys) {
'ngInject';
var self = new EventEmitter(),
stepList = [],
Function uiTourController
has a Cognitive Complexity of 73 (exceeds 5 allowed). Consider refactoring. Open
export default function uiTourController($timeout, $q, $filter, $document, TourConfig, uiTourBackdrop, uiTourService, TourStepService, hotkeys) {
'ngInject';
var self = new EventEmitter(),
stepList = [],
- Read upRead up
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 default
has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring. Open
export default function (Tether, $compile, $document, $templateCache, $rootScope, $window, $q, $timeout, positionMap, uiTourBackdrop) {
'ngInject';
const service = {},
/* eslint-disable */
- Read upRead up
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 TourHelpers
has a Cognitive Complexity of 31 (exceeds 5 allowed). Consider refactoring. Open
export default function TourHelpers($http, $compile, $location, TourConfig, $q, $injector, $timeout) {
'ngInject';
var helpers = {},
safeApply,
- Read upRead up
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 default
has 114 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function (Tether, $compile, $document, $templateCache, $rootScope, $window, $q, $timeout, positionMap, uiTourBackdrop) {
'ngInject';
const service = {},
/* eslint-disable */
File tour-controller.js
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
import angular from 'angular';
import EventEmitter from 'events';
export default function uiTourController($timeout, $q, $filter, $document, TourConfig, uiTourBackdrop, uiTourService, TourStepService, hotkeys) {
'ngInject';
Function tourStepDirective
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function tourStepDirective(TourHelpers, uiTourService, $sce) {
'ngInject';
return {
restrict: 'EA',
Function TourHelpers
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function TourHelpers($http, $compile, $location, TourConfig, $q, $injector, $timeout) {
'ngInject';
var helpers = {},
safeApply,
Function link
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
link: function (scope, element, attrs, uiTourCtrl) {
var ctrl,
//Assign required options
step,
events = 'onShow onShown onHide onHidden onNext onPrev onBackdropClick'.split(' '),
Function TourConfig
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function TourConfig() {
'ngInject';
var navigationInterceptorsEnabled = false,
config = {
Function goTo
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
self.goTo = async function (goTo) {
var currentStep = getCurrentStep(),
stepToShow = getStep(goTo),
actionMap = {
$prev: {
Function uiTourBackdrop
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function uiTourBackdrop($document, Hone) {
'ngInject';
var service = {},
$body = angular.element($document[0].body),
Function tourStepDirective
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
export default function tourStepDirective(TourHelpers, uiTourService, $sce) {
'ngInject';
return {
restrict: 'EA',
- Read upRead up
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 uiTourService
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function uiTourService($controller, $q) {
'ngInject';
var service = {},
tours = [];
Function exports
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '.',
Function default
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function (Tether, $compile, $document, $templateCache, $rootScope, $window, $q, $timeout, positionMap, uiTourBackdrop) {
Function uiTourController
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function uiTourController($timeout, $q, $filter, $document, TourConfig, uiTourBackdrop, uiTourService, TourStepService, hotkeys) {
Function uiTourDirective
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function uiTourDirective(TourHelpers) {
'ngInject';
return {
restrict: 'EA',
Function showStep
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
service.showStep = function (step, tour) {
//ensure there is a step target
if (step.elementId) {
step.element = angular.element($document[0].getElementById(step.elementId));
}
Function TourHelpers
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
export default function TourHelpers($http, $compile, $location, TourConfig, $q, $injector, $timeout) {