Showing 95 of 172 total issues
Function activateGestureControl
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
var activateGestureControl = function () {
$.getJSON('/?dev=server&cmd=activateGestureCtrl', function (data) {
var items = [];
if (!data) {
- 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
Consider simplifying this complex logical expression. Open
if ((calcRoomModel.width >= wallPoint.X && wallPoint.X >= 0
&&
calcRoomModel.height >= wallPoint.Y && wallPoint.Y >= 0
&&
calcRoomModel.depth >= wallPoint.Z && wallPoint.Z >= 0) == true)
Method AddDevice
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public string AddDevice(string type, string id, string name, string path, string repoID)
Method AddDevice
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public string AddDevice(string type, string id, string name, string path, RepositoryRepresentation repoDevice)
Method setKinect
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private bool setKinect(String x, String y, String z, String horizontal, String tilt)
Method calfunCobyla
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private static void calfunCobyla(int n, int m, double[] x, out double f, double[] con)
Method AddDevice
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public string AddDevice(string type, string id, string name, string path, RepositoryRepresentation repoDevice)
Method DrawBone
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private void DrawBone(IReadOnlyDictionary<JointType, Joint> joints, IDictionary<JointType, Point> jointPoints, JointType jointType0, JointType jointType1, DrawingContext drawingContext)
Method setCompleteKinect
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public void setCompleteKinect(double kinX, double kinY, double kinZ, double tAngle, double hAngle)
Method AddDevice
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public string AddDevice(string type, string id, string name, string path, string repoID)
Method produceDevice
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
public Device produceDevice(string type, string id, string name, string path, List<Device> devices)
Method calfunCobylaWeight
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
private static void calfunCobylaWeight(int n, int m, double[] x, out double f, double[] con)
Avoid too many return
statements within this method. Open
return newDevice.Id;
Function countDown
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var countDown = function () {
var circle = $('#outercircle');
if (counter == 0) {
$("#display").hide();
- 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 registerUser
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var registerUser = function () {
$.getJSON('/?dev=server&cmd=addUser', function (data) {
var items = [];
if (!data) {
- 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"