teco-kit/PointAndControl

View on GitHub

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) {
Severity: Minor
Found in IGS/Resources/HttpRoot/js/site.js - About 45 mins to fix

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)
Severity: Major
Found in IGS/Classifier/WPSampleCalculator.cs - About 40 mins to fix

    Method AddDevice has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            public string AddDevice(string type, string id, string name, string path, string repoID)
    Severity: Minor
    Found in IGS/MainComponents/DataHolder.cs - About 35 mins to fix

      Method AddDevice has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

              public string AddDevice(string type, string id, string name, string path, RepositoryRepresentation repoDevice)
      Severity: Minor
      Found in IGS/MainComponents/DeviceHolder.cs - About 35 mins to fix

        Method setKinect has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                private bool setKinect(String x, String y, String z, String horizontal, String tilt)
        Severity: Minor
        Found in IGS/MainComponents/PointAndControlMain.cs - About 35 mins to fix

          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)
          Severity: Minor
          Found in IGS/Locator/Locator.cs - About 35 mins to fix

            Method AddDevice has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    public string AddDevice(string type, string id, string name, string path, RepositoryRepresentation repoDevice)
            Severity: Minor
            Found in IGS/MainComponents/DataHolder.cs - About 35 mins to fix

              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)
              Severity: Minor
              Found in IGS/MainWindow.xaml.cs - About 35 mins to fix

                Method setCompleteKinect has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        public void setCompleteKinect(double kinX, double kinY, double kinZ, double tAngle, double hAngle)
                Severity: Minor
                Found in IGS/ComponentHandling/EnvironmentInfoHandler.cs - About 35 mins to fix

                  Method AddDevice has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          public string AddDevice(string type, string id, string name, string path, string repoID)
                  Severity: Minor
                  Found in IGS/MainComponents/DeviceHolder.cs - About 35 mins to fix

                    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)
                    Severity: Minor
                    Found in IGS/MainComponents/Deviceproducer.cs - About 35 mins to fix

                      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)
                      Severity: Minor
                      Found in IGS/Locator/Locator.cs - About 35 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                    return newDevice.Id;
                        Severity: Major
                        Found in IGS/MainComponents/DeviceHolder.cs - About 30 mins to fix

                          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();
                          
                          
                          Severity: Minor
                          Found in IGS/Resources/HttpRoot/js/screen.js - About 25 mins to fix

                          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) {
                          Severity: Minor
                          Found in IGS/Resources/HttpRoot/js/site.js - About 25 mins to fix

                          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

                          Severity
                          Category
                          Status
                          Source
                          Language