philipbelesky/Caribou

View on GitHub

Showing 36 of 82 total issues

Method CaribouSolveInstance has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring.
Open

        protected override void CaribouSolveInstance(IGH_DataAccess da)
        {
            logger.Reset();

            #region Input Parsing
Severity: Minor
Found in Caribou/Components/PickTagsComponent.cs - About 55 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

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

        private static void CheckBounds(XmlNode node, ref double? currentMinLat, ref double? currentMinLon,
                                                         ref double? currentMaxLat, ref double? currentMaxLon)
Severity: Minor
Found in Caribou/Processing/ParseViaXMLDocument.cs - About 35 mins to fix

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

            public static void CheckBounds(Tuple<Coord, Coord> bounds, 
                ref double? currentMinLat, ref double? currentMinLon, ref double? currentMaxLat, ref double? currentMaxLon)
    Severity: Minor
    Found in Caribou/Processing/ParseViaXMLReader.cs - About 35 mins to fix

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

              private static void CheckBounds(Tuple<Coord, Coord> bounds, ref double? currentMinLat, ref double? currentMinLon,
                                                                ref double? currentMaxLat, ref double? currentMaxLon)
      Severity: Minor
      Found in Caribou/Processing/ParseViaLinq.cs - About 35 mins to fix

        Avoid too many return statements within this method.
        Open

                        return "Common";
        Severity: Major
        Found in Caribou/Forms/Models/OSMTreeGridItem.cs - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      if (this.CancellationToken.IsCancellationRequested) { done(); return; }
          Severity: Major
          Found in Caribou/Workers/BaseLoadAndParseWorker.cs - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                        if (this.CancellationToken.IsCancellationRequested) { done(); return; }
            Severity: Major
            Found in Caribou/Workers/BaseLoadAndParseWorker.cs - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                          if (this.CancellationToken.IsCancellationRequested) { done(); return; }
              Severity: Major
              Found in Caribou/Workers/BaseLoadAndParseWorker.cs - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                            return false;
                Severity: Major
                Found in Caribou/Forms/Models/OSMTreeGridItem.cs - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                  return this.OSMData.NodeCount + this.OSMData.WayCount < OBSCURITY_THRESHOLD;
                  Severity: Major
                  Found in Caribou/Forms/Models/OSMTreeGridItem.cs - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                if (this.CancellationToken.IsCancellationRequested) { done(); return; }
                    Severity: Major
                    Found in Caribou/Workers/BaseLoadAndParseWorker.cs - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                      return "Very Common";
                      Severity: Major
                      Found in Caribou/Forms/Models/OSMTreeGridItem.cs - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                        return "Abundant";
                        Severity: Major
                        Found in Caribou/Forms/Models/OSMTreeGridItem.cs - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                          return "Heaps";
                          Severity: Major
                          Found in Caribou/Forms/Models/OSMTreeGridItem.cs - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                            return "Uncommon";
                            Severity: Major
                            Found in Caribou/Forms/Models/OSMTreeGridItem.cs - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              return;
                              Severity: Major
                              Found in Caribou/CaribouAsyncComponent.cs - About 30 mins to fix
                                Severity
                                Category
                                Status
                                Source
                                Language