Skip to content

Instantly share code, notes, and snippets.

@snodgrass23
Created November 11, 2012 15:34
Show Gist options
  • Save snodgrass23/4055238 to your computer and use it in GitHub Desktop.
Save snodgrass23/4055238 to your computer and use it in GitHub Desktop.
analysis errors
[ { id: '(error)',
raw: 'Expected \'{a}\' and instead saw \'{b}\'.',
evidence: ' if (val === \'Recently Active\') search.sort.lastLogin = -1;',
line: 58,
character: 34,
scope: '(main)',
a: '{',
b: 'search',
c: undefined,
d: undefined,
reason: 'Expected \'{\' and instead saw \'search\'.',
type: 'misc' },
{ id: '(error)',
raw: 'Expected \'{a}\' and instead saw \'{b}\'.',
evidence: ' else if (val === \'Newest Members\') search.sort.becameMember = -1;',
line: 59,
character: 38,
scope: '(main)',
a: '{',
b: 'search',
c: undefined,
d: undefined,
reason: 'Expected \'{\' and instead saw \'search\'.',
type: 'misc' },
{ id: '(error)',
raw: 'Expected \'{a}\' and instead saw \'{b}\'.',
evidence: ' else if (val === \'Alphabetical\') search.sort[\'fixed.displayname\'] = 1;',
line: 60,
character: 36,
scope: '(main)',
a: '{',
b: 'search',
c: undefined,
d: undefined,
reason: 'Expected \'{\' and instead saw \'search\'.',
type: 'misc' },
{ id: '(error)',
raw: 'Expected an identifier and instead saw \'{a}\' (a reserved word).',
evidence: ' search.query.where(path).in(val);',
line: 73,
character: 32,
scope: '(main)',
a: 'in',
b: undefined,
c: undefined,
d: undefined,
reason: 'Expected an identifier and instead saw \'in\' (a reserved word).',
type: 'misc' },
{ id: '(error)',
raw: 'Expected \'{a}\' and instead saw \'{b}\'.',
evidence: ' if (val === true || val === \'true\') search.query.where(\'photoCount\').gt(0);',
line: 91,
character: 43,
scope: '(main)',
a: '{',
b: 'search',
c: undefined,
d: undefined,
reason: 'Expected \'{\' and instead saw \'search\'.',
type: 'misc' },
{ id: '(error)',
raw: 'Expected \'{a}\' and instead saw \'{b}\'.',
evidence: ' if (val.min !== \'undefined\' && val.max !== \'undefined\') search.query.where(path).gte(val.min).lte(val.max);',
line: 99,
character: 63,
scope: '(main)',
a: '{',
b: 'search',
c: undefined,
d: undefined,
reason: 'Expected \'{\' and instead saw \'search\'.',
type: 'misc' },
{ id: '(error)',
raw: 'Cyclomatic complexity is too high per function (13).',
evidence: ' Object.keys(search.criteria).forEach(function (path) {',
line: 69,
character: 49,
scope: '(main)',
a: undefined,
b: undefined,
c: undefined,
d: undefined,
reason: 'Cyclomatic complexity is too high per function (13).',
type: 'complexity',
lastline: 104,
lastcharacter: 4 },
{ id: '(error)',
raw: 'Extra comma.',
evidence: ' criteria: {type: mongoose.Schema.Types.Mixed, \'default\': {}},',
line: 112,
character: 65,
scope: '(main)',
a: undefined,
b: undefined,
c: undefined,
d: undefined,
reason: 'Extra comma.',
type: 'misc' },
{ id: '(error)',
raw: 'Expected \'{a}\' and instead saw \'{b}\'.',
evidence: ' if (err) return done(err);',
line: 127,
character: 18,
scope: '(main)',
a: '{',
b: 'return',
c: undefined,
d: undefined,
reason: 'Expected \'{\' and instead saw \'return\'.',
type: 'misc' },
{ id: '(error)',
raw: 'Expected \'{a}\' and instead saw \'{b}\'.',
evidence: ' if (!that.criteria.pageNumber && !that.criteria.limit) that.query.limit(9).sort(that.sort).exec(done);',
line: 131,
character: 64,
scope: '(main)',
a: '{',
b: 'that',
c: undefined,
d: undefined,
reason: 'Expected \'{\' and instead saw \'that\'.',
type: 'misc' },
{ id: '(error)',
raw: 'Expected \'{a}\' and instead saw \'{b}\'.',
evidence: ' else that.query.sort(that.sort).exec(done);',
line: 132,
character: 14,
scope: '(main)',
a: '{',
b: 'that',
c: undefined,
d: undefined,
reason: 'Expected \'{\' and instead saw \'that\'.',
type: 'misc' },
{ id: '(error)',
raw: 'Expected \'{a}\' and instead saw \'{b}\'.',
evidence: ' if (err) return callback(err);',
line: 140,
character: 16,
scope: '(main)',
a: '{',
b: 'return',
c: undefined,
d: undefined,
reason: 'Expected \'{\' and instead saw \'return\'.',
type: 'misc' },
{ id: '(error)',
raw: 'Expected an identifier and instead saw \'{a}\' (a reserved word).',
evidence: ' app.models.profile.where(\'_id\').in(profile.blocked).exec(callback);',
line: 141,
character: 39,
scope: '(main)',
a: 'in',
b: undefined,
c: undefined,
d: undefined,
reason: 'Expected an identifier and instead saw \'in\' (a reserved word).',
type: 'misc' },
{ id: '(error)',
raw: 'Expected \'{a}\' and instead saw \'{b}\'.',
evidence: ' if (err) return callback(err);',
line: 158,
character: 18,
scope: '(main)',
a: '{',
b: 'return',
c: undefined,
d: undefined,
reason: 'Expected \'{\' and instead saw \'return\'.',
type: 'misc' },
{ id: '(error)',
raw: '\'{a}\' is defined but never used.',
evidence: ' city = search.criteria.city;',
line: 150,
character: 16,
scope: '(main)',
a: 'city',
b: undefined,
c: undefined,
d: undefined,
reason: '\'city\' is defined but never used.',
type: 'misc' } ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment