neotoma/sync-server

View on GitHub

Showing 278 of 278 total issues

Function validator has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

      validator: function(value) {
        try {
          if (['undefined', 'object'].indexOf(typeof value) === -1) {
            throw new Error('Invalid value found');
          } else if (typeof value === 'object') {
Severity: Minor
Found in app/models/contactVerificationRequest.js - About 25 mins to fix

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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = function(data, included, errors) {
  var doc = {};

  if (data) {
    doc['data'] = data;
Severity: Minor
Found in app/lib/jsonapi/responseDocument.js - About 25 mins to fix

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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = function(page) {
  validateParams([{
    name: 'page', variable: page, required: true, requiredType: 'object'
  }]);

Severity: Minor
Found in app/controllers/item/itemsPageError.js - About 25 mins to fix

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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = function(user, source, storage, contentType, done) {
  var saveUser = (done) => {
    user.save((error) => {
      debug('saved user %s', user.id);
      done(error);
Severity: Minor
Found in tests/controllers/item/routines/prepareStoreAll.js - About 25 mins to fix

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

Definition for rule 'padding-line-between-statements' was not found
Open

require('park-ranger')();

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

require('park-ranger')();
Severity: Minor
Found in tests/app.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

require('park-ranger')();
Severity: Minor
Found in Gruntfile.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

require('park-ranger')();

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

require('park-ranger')();

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

require('park-ranger')();

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

require('park-ranger')();

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

require('park-ranger')();

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

require('park-ranger')();
Severity: Minor
Found in tests/lib/jsonapi.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

it('throws error when app parameter not provided');
Severity: Minor
Found in tests/routers/auth.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

var it = require('./it');

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

var _ = require('app/lib/lodash'),

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

var modelQueryConditions = require('app/lib/jsonapi/modelQueryConditions');

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

var jsonapi = {
Severity: Minor
Found in app/lib/jsonapi/index.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

module.exports = require('minimist')(process.argv.slice(2));
Severity: Minor
Found in app/lib/minimist.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Definition for rule 'padding-line-between-statements' was not found
Open

var logger = require('./logger'),
Severity: Minor
Found in app/lib/morgan.js by eslint

For more information visit Source: http://eslint.org/docs/rules/

Severity
Category
Status
Source
Language