Showing 364 of 761 total issues
Function exports
has 682 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports = module.exports = function(params) {
var mongoose = params.mongoose;
Function exports
has 660 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports = module.exports = function(params) {
const mongoose = params.mongoose;
const accountSchema = new mongoose.Schema({
user: {
id: { type: mongoose.Schema.Types.ObjectId, ref: 'User', index: true, unique: true },
Function exports
has 586 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports = module.exports = function(params) {
const dispunits = params.app.utility.dispunits;
const mongoose = params.mongoose;
Function exports
has 568 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports = module.exports = function(params) {
let mongoose = params.mongoose;
let userSchema = new mongoose.Schema({
password: { type: String, select: false },
Function exports
has a Cognitive Complexity of 130 (exceeds 5 allowed). Consider refactoring. Open
exports = module.exports = function(params) {
const mongoose = params.mongoose;
var requestSchema = new mongoose.Schema({
- 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 exports
has 526 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports = module.exports = function(params) {
const mongoose = params.mongoose;
var requestSchema = new mongoose.Schema({
Function exports
has 405 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports = module.exports = function(params) {
const mongoose = params.mongoose;
var defaultHalfDay = new Date();
Function exports
has a Cognitive Complexity of 87 (exceeds 5 allowed). Consider refactoring. Open
exports = module.exports = function(params) {
const dispunits = params.app.utility.dispunits;
const mongoose = params.mongoose;
- 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
File Right_Renewal.js
has 687 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
const consumptionHistory = require('../modules/consumptionHistory');
const util = require('util');
File User_Account.js
has 666 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
const jurassic = require('jurassic');
const util = require('util');
const userAccountCustomize = require('./plugins/userAccountCustomize');
Function loadCalendarService
has 298 lines of code (exceeds 25 allowed). Consider refactoring. Open
return function loadCalendarService($locale, $q, $routeParams) {
/**
* Object for calendar day
*/
Function getInitTask
has 284 lines of code (exceeds 25 allowed). Consider refactoring. Open
calendarSchema.statics.getInitTask = function(company) {
let model = this;
const gt = params.app.utility.gettext;
Function createDefaults
has 277 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createDefaults() {
let allCalendars = [
{
_id: '5740adf51cf1a569643cc101',
Function exports
has a Cognitive Complexity of 69 (exceeds 5 allowed). Consider refactoring. Open
exports = module.exports = function(params) {
const mongoose = params.mongoose;
const accountSchema = new mongoose.Schema({
user: {
id: { type: mongoose.Schema.Types.ObjectId, ref: 'User', index: true, unique: true },
- 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 saveRequests
has 271 lines of code (exceeds 25 allowed). Consider refactoring. Open
function saveRequests(service, params) {
const gt = service.app.utility.gettext;
const postpone = service.app.utility.postpone;
File Right.js
has 590 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
const SpecialRightIndex = require('../api/specialrights/index');
File User.js
has 577 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
const bcrypt = require('bcryptjs');
const Charlatan = require('charlatan');
const util = require('util');
Function exports
has 235 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function(grunt) {
'use strict';
let pkg = require('./package.json');
File Request.js
has 539 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
/**
* array map function to get Id from the document or ID
Function exports
has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring. Open
exports = module.exports = function(params) {
let mongoose = params.mongoose;
let userSchema = new mongoose.Schema({
password: { type: String, select: false },
- 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"