Showing 55 of 55 total issues
Function constructor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
constructor(defaultAngle) {
// If there are table dependent points
for (let i = 1; i < arguments.length; i++) {
// Check if the argument is valid
- 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 getColor
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getColor() {
let bestMatch = {
difference: Infinity,
color: null
};
- 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 getDriversByGroup
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getDriversByGroup(type) {
let filteredDrivers = {};
for (let driverKey in this.drivers) {
if (this.drivers.hasOwnProperty(driverKey) == 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"
Further reading
Function _goSingleTarget
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
_goSingleTarget(point, params) {
Mep.Log.debug(TAG, 'Simple target go', point);
this._paused = false;
// Set speed
- 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 make
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static make() {
global.Scheduler = Mep.require('strategy/Scheduler');
global.Task = Mep.require('strategy/Task');
global.delay = Mep.require('misc/Delay');
- 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 send
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
send(buffer, callback, type) {
if (this._enabled === false) {
return;
}
- 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 _loadDriverBasic
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
async _loadDriverBasic(ModuleClass, moduleConfig, driverIdentifier, classPath) {
if (typeof ModuleClass === 'function') {
let driverInstance;
try {
driverInstance = new ModuleClass(driverIdentifier, moduleConfig);
- 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 _onPathObstacleDetected
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
_onPathObstacleDetected(detected, friend) {
if (detected === true) {
let target = this._targetQueue.getTargetFront();
let timeout = (friend === true) ? target.getParams().friend : target.getParams().obstacle;
- 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
TODO found Open
// ako nema tacaka na koje moze da se ode (TODO mozda moze pametnije da se uradi)
- Exclude checks
TODO found Open
// TODO kad se desi greska da se proba flushovati ili zatvoriti pa otvoriti uart
- Exclude checks
TODO found Open
* TODO: Delete this driver as soon as big robot is taken down.
- Exclude checks
TODO found Open
// TODO: Consider new algorithm: http://stackoverflow.com/a/2752754/1983050
- Exclude checks
TODO found Open
TODO: Try to redesign a path in runtime
- Exclude checks
TODO found Open
// TODO mozda dodati proveru sa minX, maxX.. da li je unutar opisanog pravougaonika radi ubrzanja, sem ako ga to ne uspori zbog dodatnog racunanja
- Exclude checks
TODO found Open
// TODO: Sensor Fusion problem: https://en.wikipedia.org/wiki/Sensor_fusion
- Exclude checks