Showing 144 of 396 total issues
Consider simplifying this complex logical expression. Open
if ((key !== 'shards') && (key !== 'replicas') &&
(key !== 'dryRun') && (key !== 'primaryReplicaTag') &&
(key !== 'nonvotingReplicaTags') && (key !== 'emergencyRepair')) {
throw new errors.ReqlDriverError('Unrecognized option `'+key+'` in `reconfigure`', self._query, 'Available options are shards: <number>, replicas: <number>, primaryReplicaTag: <object>, dryRun <boolean>, emergencyRepair: <string>, nonvotingReplicaTags: <array<string>>');
}
Function TABLE
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
TABLE: function(term, index, father, frames, options) {
Function generateNormalBacktrace
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function generateNormalBacktrace(term, index, father, frames, options) {
Function _arityRange
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Term.prototype._arityRange = function(args, min, max, method, term) {
Function GET_FIELD
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
GET_FIELD: function(term, index, father, frames, options) {
Function IMPLICIT_VAR
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
IMPLICIT_VAR: function(term, index, father, frames, options) {
Function MAP
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
MAP: function(term, index, father, frames, options) {
Function WAIT
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
WAIT: function(term, index, father, frames, options) {
Function generateWithoutPrefixBacktrace
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function generateWithoutPrefixBacktrace(term, index, father, frames, options) {
Function FUNC
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
FUNC: function(term, index, father, frames, options) {
Function generateBacktrace
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function generateBacktrace(term, index, father, frames, options) {
Function VAR
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
VAR: function(term, index, father, frames, options) {
Function MAKE_ARRAY
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
MAKE_ARRAY: function(term, index, father, frames, options) {
Function FUNCALL
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
FUNCALL: function(term, index, father, frames, options) {
Function random
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Term.prototype.random = function() {
var _len = arguments.length; var _args = new Array(_len);
for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
var self = this;
self._noPrefix(this, 'random');
- 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 _flush
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Cursor.prototype._flush = function() {
while ((this._pendingPromises.length > 0) && ((this._data.length > 0) || ((this._fetching === false) && (this._canFetch === false)))) {
var fullfiller = this._pendingPromises.shift();
var resolve = fullfiller.resolve;
var reject = fullfiller.reject;
- 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 generateBacktrace
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function generateBacktrace(term, index, father, frames, options) {
var result = { str: '', car: '' };
var backtrace, underline;
// frames = null -> do not underline
- 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 indexCreate
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Term.prototype.indexCreate = function(name, fn, options) {
if (this._fastArityRange(arguments.length, 1, 3) === false) {
var _len = arguments.length; var _args = new Array(_len);
for (var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
this._arityRange(_args, 1, 3, 'indexCreate', this);
- 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 union
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Term.prototype.union = function() {
var _len = arguments.length;var _args = new Array(_len); for(var _i = 0; _i < _len; _i++) {_args[_i] = arguments[_i];}
var term = new Term(this._r);
term._query.push(termTypes.UNION);
- 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 Term
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function Term(r, value, error) {
var self = this;
var term = function(field) {
if (Term.prototype._fastArity(arguments.length, 1) === false) {
var _len = arguments.length; var _args = new Array(_len);
- 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"