Showing 20 of 458 total issues
File employee-account-details.spec.js
has 439 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author Martin Micunda {@link http://martinmicunda.com}
* @copyright Copyright (c) 2015, Martin Micunda
* @license GPL-3.0
*/
File account-details.spec.js
has 375 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author Martin Micunda {@link http://martinmicunda.com}
* @copyright Copyright (c) 2015, Martin Micunda
* @license GPL-3.0
*/
File modal-document.spec.js
has 368 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author Martin Micunda {@link http://martinmicunda.com}
* @copyright Copyright (c) 2015, Martin Micunda
* @license GPL-3.0
*/
File modal-partner.spec.js
has 361 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author Martin Micunda {@link http://martinmicunda.com}
* @copyright Copyright (c) 2015, Martin Micunda
* @license GPL-3.0
*/
File modal-location.spec.js
has 342 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author Martin Micunda {@link http://martinmicunda.com}
* @copyright Copyright (c) 2015, Martin Micunda
* @license GPL-3.0
*/
Function init
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
init($httpBackend, localStorageService, route, mockData, mockListData, errorField){
const patternBase = new RegExp(`\/${route}`);
const patternGet = new RegExp(`\/${route}\/[a-z]*`);
const patternId = new RegExp(`\/${route}\/(\\d+|[a-z]*)`);
const key = route.slice(0, -1);
Function runFactory
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Run()
@Inject('$httpBackend', '$window')
//end-non-standard
static runFactory($httpBackend, $window){
$httpBackend.whenPOST(/\/login/)
Function getCalendarConfig
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
getCalendarConfig(scope, calendarView) {
let resourcesLength = 1;
const height = Math.max(600, this.$window.innerHeight - 220);
const config = {
File password.spec.js
has 262 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author Martin Micunda {@link http://martinmicunda.com}
* @copyright Copyright (c) 2015, Martin Micunda
* @license GPL-3.0
*/
File header.spec.js
has 261 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* @author Martin Micunda {@link http://martinmicunda.com}
* @copyright Copyright (c) 2015, Martin Micunda
* @license GPL-3.0
*/
Function exports
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
config.set({
frameworks: ['jspm', 'jasmine'],
files: [
Function constructor
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
constructor($timeout, $compile, $state, $modal, $window, localStorageService, AvailabilityModel, uiCalendarConfig, ModalService, AuthenticationService, FormService, EmployeeResource) {
const date = new Date();
const m = date.getMonth();
const y = date.getFullYear();
this.$compile = $compile;
Function runFactory
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Run()
@Inject('$httpBackend', 'localStorageService')
//end-non-standard
runFactory($httpBackend, localStorageService){
const key = 'availability';
Function runFactory
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Run()
@Inject('$rootScope', '$state', '$log', 'AuthenticationService')
//end-non-standard
static runFactory($rootScope, $state, $log, AuthenticationService){
$rootScope.currentUser = AuthenticationService.getCurrentUser();
Function getCalendarConfig
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
getCalendarConfig(scope, calendarView) {
let resourcesLength = 1;
const height = Math.max(600, this.$window.innerHeight - 220);
const config = {
- 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 onFailure
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
onFailure(self, response) {
self.result = 'error';
self.hasError = true;
if(response.status === 400) {
self.errorMessage = response.data.message;
- 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 request
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
request(config) {
// Filter out requests for .html templates, etc
if (self.shouldPrependApiUrl(config)) {
config.url = self.apiUrl + config.url;
- 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
Avoid too many return
statements within this function. Open
return [200];
Function Component
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function Component(component) {
return function decorator(target) {
component = component ? component : {};
if (!component.selector) {
throw new Error('@Component() must contains selector property!');
- 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 createOrReplaceAvailabilities
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
createOrReplaceAvailabilities(dateRangeLength, availability) {
let i = 0, id, idx, date;
const availabilities = this.AvailabilityModel.getCollection();
const startDate = moment(availability.start); // make `availability.start` object immutable for add function
- 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"