cs-util-com/cscore

View on GitHub

Showing 1,140 of 1,140 total issues

Method ParseDelimitedLine has a Cognitive Complexity of 48 (exceeds 20 allowed). Consider refactoring.
Open

        private string[] ParseDelimitedLine()
        {
            string Line = ReadNextDataLine();
            if (Line == null)
                return null;

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 InternalDecode has 122 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private ImageResult InternalDecode(ColorComponents? requiredComponents, int bpc)
        {
            var pixelCount = 0;
            var channelCount = 0;
            var compression = 0;

    Class JpgDecoder has 37 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public
    #else
        internal
    #endif
        class JpgDecoder : Decoder

      Class IEnumerableExtensions has 37 methods (exceeds 20 allowed). Consider refactoring.
      Open

          public static class IEnumerableExtensions {
      
              public static IEnumerable<R> Map<T, R>(this IEnumerable<T> self, Func<T, R> selector) {
                  return self.Select(selector);
              }

        Method LateUpdate has 119 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                protected override void LateUpdate()
                {
                    // We do  the actual internal mesh updating as late as possible so nothing ends up a frame behind
                    var deltaTime = Time.deltaTime;
        
        

          Method GetTagValue has 119 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private bool GetTagValue<T>(Dictionary<ushort, long> tagDictionary, ushort tagID, out T result)
                  {
                      ushort tiffDataType;
                      uint numberOfComponents;
                      byte[] tagData = GetTagBytes(tagDictionary, tagID, out tiffDataType, out numberOfComponents);

            Method Analyze has a Cognitive Complexity of 47 (exceeds 20 allowed). Consider refactoring.
            Open

                    private void Analyze(AnalyzeOpts opts, AnalyzeOutput output)
                    {
                        if (opts.value == null)
                        {
                            return;

            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 OnPopulateMesh has 118 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    protected override void OnPopulateMesh(VertexHelper vh)
                    {
                        vh.Clear();
            
                        Rect pixelRect = RectTransformUtility.PixelAdjustRect(rectTransform, canvas);

              Class IEntityExtensions has 36 methods (exceeds 20 allowed). Consider refactoring.
              Open

                  public static class IEntityExtensions {
              
                      public static IEnumerable<IEntity<T>> GetChildren<T>(this IEntity<T> self) where T : IEntityData {
                          self.ThrowErrorIfDisposed();
                          if (self.ChildrenIds == null) { return null; }

                Class TextFieldParser has 35 methods (exceeds 20 allowed). Consider refactoring.
                Open

                    public class TextFieldParser : IDisposable
                    {
                
                        // ==PUBLIC**************************************************************
                
                

                  Method OnPopulateMesh has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          protected override void OnPopulateMesh(VertexHelper vh)    {
                              vh.Clear();
                  
                              Rect pixelRect = RectTransformUtility.PixelAdjustRect(rectTransform, canvas);
                  
                  

                    Method RefreshSettingsUi has 112 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            protected override void RefreshSettingsUi(IGraphicsSettings model) {
                                var links = targetView.GetLinkMap();
                    
                                // VSync toggle
                                links.Get<Toggle>("VSyncToggle").isOn = model.UseVSync;

                      Method ReadNextLine has a Cognitive Complexity of 45 (exceeds 20 allowed). Consider refactoring.
                      Open

                              private string ReadNextLine(ref int Cursor, ChangeBufferFunction ChangeBuffer)
                              {
                                  //Debug.Assert(m_Buffer != null, "There's no buffer");
                                  //Debug.Assert((Cursor >= 0) & (Cursor <= m_CharsRead), "The cursor is out of range");
                      
                      

                      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 diff_cleanupMerge has 108 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public void diff_cleanupMerge(List<Diff> diffs) {
                            // Add a dummy entry at the end.
                            diffs.Add(new Diff(Operation.EQUAL, string.Empty));
                            int pointer = 0;
                            int count_delete = 0;

                        File UIGeoUtils.cs has 344 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        using UnityEngine;
                        using UnityEngine.UI;
                        using System.Collections;
                        
                        using ThisOtherThing.Utils;

                          Method RecoveryDetectCollectionByIndexPages has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring.
                          Open

                                  private static HashSet<uint> RecoveryDetectCollectionByIndexPages(UltraLiteEngine engine, HashSet<uint> initialPagesID, StringBuilder log)
                                  {
                                      var indexPages = new Dictionary<uint, bool>();
                                      var dataPages = new HashSet<uint>();
                          
                          

                          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 diff_cleanupSemantic has a Cognitive Complexity of 44 (exceeds 20 allowed). Consider refactoring.
                          Open

                              public void diff_cleanupSemantic(List<Diff> diffs) {
                                bool changes = false;
                                // Stack of indices where equalities are found.
                                Stack<int> equalities = new Stack<int>();
                                // Always equal to equalities[equalitiesLength-1][1]

                          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 Analyze has 106 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  private void Analyze(AnalyzeOpts opts, AnalyzeOutput output)
                                  {
                                      if (opts.value == null)
                                      {
                                          return;

                            File IEntityExtensions.cs has 342 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            using System;
                            using System.Collections.Generic;
                            using System.Collections.Immutable;
                            using System.Diagnostics;
                            using System.Linq;

                              File XRLineRenderer.cs has 335 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              using UnityEngine;
                              using UnityEngine.Serialization;
                              
                              namespace com.csutil.rendering
                              {
                                Severity
                                Category
                                Status
                                Source
                                Language