Showing 95 of 172 total issues
Function Urn
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
Open
var Urn = function () {
this.count = 0;
this.collection = {};
this.lastDraw = "";
- 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
Method DrawBody
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void DrawBody(IReadOnlyDictionary<JointType, Joint> joints, IDictionary<JointType, Point> jointPoints, DrawingContext drawingContext)
{
// Draw the bones
// Torso
Function constraintsToFF37
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var constraintsToFF37 = function(c) {
if (typeof c !== 'object' || c.require) {
return c;
}
var require = [];
Function Urn
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Urn = function () {
this.count = 0;
this.collection = {};
this.lastDraw = "";
Function updateMapFromList
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
Open
var updateMapFromList = function () {
$.getJSON('/?dev=server&cmd=list', function (data) {
var a = document.getElementById("mapSvg");
var svgDoc = a.contentDocument;
var circles = svgDoc.getElementsByTagName("a");
- 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
Method HandleGetRequest
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override void HandleGetRequest(HttpProcessor p)
{
string querystring = null;
string pathstring = null;
Method HandlePostRequest
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void HandlePostRequest()
{
// this post data processing just reads everything into a memory stream.
// this is fine for smallish things, but for large stuff we should really
// hand an input stream to the request processor. However, the input stream
Method GetCoordinatesWindow
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public List<Point3D[]> GetCoordinatesWindow(int id)
{
List<Point3D[]> returnList = new List<Point3D[]>();
workingOnWindow = true;
Function getStats
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
pc.getStats = function(selector, successCallback, errorCallback) { // jshint ignore: line
var self = this;
var args = arguments;
// If selector is a function then we are in the old style stats so just
Method setKinect
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private bool setKinect(String x, String y, String z, String horizontal, String tilt)
{
double parsedX;
double parsedY;
double parsedZ;
Method Mute
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private String Mute()
{
byte[] msg = new byte[15];
byte[] message = new byte[] { 0x01, 0x30, 0x41, 0x30, 0x43, 0x30, 0x36, 0x02, 0x30, 0x30, 0x38, 0x3D, 0x03 };
Method readWallProjectionAndPositionSamplesFromXML
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static List<WallProjectionAndPositionSample> readWallProjectionAndPositionSamplesFromXML()
{
List<WallProjectionAndPositionSample> sampleList = new List<WallProjectionAndPositionSample>();
XmlDocument docConfig = new XmlDocument();
Method produceDevice
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public Device produceDevice(string type, string id, string name, string path, List<Device> devices)
{
string idparam = "";
if (id != "")
Method sendData
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void sendData(HttpProcessor p)
{
//TODO: Write Flexible Header usage
String pathstring = null;
int iqs = p.HttpUrl.IndexOf("?");
Method initBodyBones
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void initBodyBones(int bodyNr, List<Point3D> pList, List<Point3D> midSection)
{
//from right to center;
Method replaceBodyBones
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void replaceBodyBones(int bodyNr, List<Point3D> pList, List<Point3D> midSection)
{
for (int i = 0; i < 4; i++)
{
Method GetCoordinates
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public Point3D[] GetCoordinates(int id)
{
foreach (TrackedSkeleton sTracked in Bodies.Where(sTracked => sTracked.Id == id))
{
sTracked.Actions = sTracked.Actions + 1;
Method RenderClippedEdges
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private static void RenderClippedEdges(Body body, DrawingContext drawingContext)
{
if (body.ClippedEdges.HasFlag(FrameEdges.Bottom))
{
drawingContext.DrawRectangle(
Method readWallProjectionSamplesFromXML
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static List<WallProjectionSample> readWallProjectionSamplesFromXML()
{
List<WallProjectionSample> sampleList = new List<WallProjectionSample>();
XmlDocument docConfig = new XmlDocument();
Method jointFilter
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public Point3D[] jointFilter(List<Point3D[]> jointLists)
{
Point3D[] filtered = new Point3D[4];
double minDist = 0;