codibre/dotnet-dictionary-chain

View on GitHub

Showing 34 of 34 total issues

File DictionaryChainExtension.Test.cs has 505 lines of code (exceeds 250 allowed). Consider refactoring.
Open

namespace Test
{
    [TestClass]
    public class DictionaryChainExtension
    {
Severity: Major
Found in Test/DictionaryChainExtension.Test.cs - About 1 day to fix

    Method Create_LevelN7_Dictionary has 135 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            [TestMethod]
            public void Create_LevelN7_Dictionary()
            {
                var result = target.ToDictionaryChain(
                    (x) => x.FieldString,
    Severity: Major
    Found in Test/DictionaryChainExtension.Test.cs - About 5 hrs to fix

      Method Create_Level6_Dictionary has 109 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              [TestMethod]
              public void Create_Level6_Dictionary()
              {
                  var result = target.ToDictionaryChain(
                      (x) => x.FieldString,
      Severity: Major
      Found in Test/DictionaryChainExtension.Test.cs - About 4 hrs to fix

        File DictionaryChainReduceExtension.cs has 279 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using System;
        using System.Collections.Generic;
        
        namespace Codibre.DictionaryChain
        {
        Severity: Minor
        Found in DictionaryChain/DictionaryChainReduceExtension.cs - About 2 hrs to fix

          Method Create_Level5_Dictionary has 65 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  [TestMethod]
                  public void Create_Level5_Dictionary()
                  {
                      var result = target.ToDictionaryChain(
                          (x) => x.FieldString,
          Severity: Major
          Found in Test/DictionaryChainExtension.Test.cs - About 2 hrs to fix

            Method ToDictionaryChain has 11 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                            this IEnumerable<V> list,
                            Func<TLeaf> startValue,
                            Func<TLeaf, V, TLeaf> incValue,
                            Func<V, ChainKeyType> key0,
                            Func<V, ChainKeyType> key1,
            Severity: Major
            Found in DictionaryChain/DictionaryChainReduceExtension.cs - About 1 hr to fix

              Method Create_Level4_Dictionary has 32 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      [TestMethod]
                      public void Create_Level4_Dictionary()
                      {
                          var result = target.ToDictionaryChain(
                              (x) => x.FieldString,
              Severity: Minor
              Found in Test/DictionaryChainExtension.Test.cs - About 1 hr to fix

                Method ToDictionaryChain has 10 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                            this IEnumerable<V> list,
                            Func<TLeaf> startValue,
                            Func<TLeaf, V, TLeaf> incValue,
                            Func<V, K0> key0,
                            Func<V, K1> key1,
                Severity: Major
                Found in DictionaryChain/DictionaryChainReduceExtension.cs - About 1 hr to fix

                  Method ToDictionaryChain has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public static ChainedDictionary<TLeaf> ToDictionaryChain<V, TLeaf>(
                                  this IEnumerable<V> list,
                                  Func<TLeaf> startValue,
                                  Func<TLeaf, V, TLeaf> incValue,
                                  Func<V, ChainKeyType> key0,
                  Severity: Minor
                  Found in DictionaryChain/DictionaryChainReduceExtension.cs - About 1 hr to fix

                    Method Initialize has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            [TestInitialize]
                            public void Initialize()
                            {
                                target = new()
                                {
                    Severity: Minor
                    Found in Test/DictionaryChainExtension.Test.cs - About 1 hr to fix

                      Method ToFixedDictionary has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              private TDictionary ToFixedDictionary<TDictionary, K, T>()
                                  where TDictionary : Dictionary<K, T>
                              {
                                  var dictType = typeof(T);
                                  var result = (TDictionary)Activator.CreateInstance(typeof(TDictionary));
                      Severity: Minor
                      Found in DictionaryChain/Types.cs - About 1 hr to fix

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                                        (
                                                            1,
                                                            KVList(
                                                                (
                                                                    false,
                        Severity: Major
                        Found in Test/DictionaryChainExtension.Test.cs and 1 other location - About 1 hr to fix
                        Test/DictionaryChainExtension.Test.cs on lines 253..273

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 99.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 2 locations. Consider refactoring.
                        Open

                                                (
                                                    "a",
                                                    KVList(
                                                        (
                                                            1,
                        Severity: Major
                        Found in Test/DictionaryChainExtension.Test.cs and 1 other location - About 1 hr to fix
                        Test/DictionaryChainExtension.Test.cs on lines 372..392

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 99.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Method ToDictionaryChain has 9 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                                    this IEnumerable<V> list,
                                    Func<TLeaf> startValue,
                                    Func<TLeaf, V, TLeaf> incValue,
                                    Func<V, K0> key0,
                                    Func<V, K1> key1,
                        Severity: Major
                        Found in DictionaryChain/DictionaryChainReduceExtension.cs - About 1 hr to fix

                          Method ToDictionaryChain has 9 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                                          this IEnumerable<V> list,
                                          Func<V, ChainKeyType> key0,
                                          Func<V, ChainKeyType> key1,
                                          Func<V, ChainKeyType> key2,
                                          Func<V, ChainKeyType> key3,
                          Severity: Major
                          Found in DictionaryChain/DictionaryChainExtension.cs - About 1 hr to fix

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Open

                                                    (
                                                        "c",
                                                        KVList(
                                                            (
                                                                3,
                            Severity: Major
                            Found in Test/DictionaryChainExtension.Test.cs and 3 other locations - About 1 hr to fix
                            Test/DictionaryChainExtension.Test.cs on lines 398..416
                            Test/DictionaryChainExtension.Test.cs on lines 417..435
                            Test/DictionaryChainExtension.Test.cs on lines 441..459

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 94.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Open

                                                            (
                                                                1,
                                                                KVList(
                                                                    (
                                                                        true,
                            Severity: Major
                            Found in Test/DictionaryChainExtension.Test.cs and 3 other locations - About 1 hr to fix
                            Test/DictionaryChainExtension.Test.cs on lines 307..325
                            Test/DictionaryChainExtension.Test.cs on lines 417..435
                            Test/DictionaryChainExtension.Test.cs on lines 441..459

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 94.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Open

                                                            (
                                                                2,
                                                                KVList(
                                                                    (
                                                                        false,
                            Severity: Major
                            Found in Test/DictionaryChainExtension.Test.cs and 3 other locations - About 1 hr to fix
                            Test/DictionaryChainExtension.Test.cs on lines 307..325
                            Test/DictionaryChainExtension.Test.cs on lines 398..416
                            Test/DictionaryChainExtension.Test.cs on lines 441..459

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 94.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Similar blocks of code found in 4 locations. Consider refactoring.
                            Open

                                                            (
                                                                3,
                                                                KVList(
                                                                    (
                                                                        false,
                            Severity: Major
                            Found in Test/DictionaryChainExtension.Test.cs and 3 other locations - About 1 hr to fix
                            Test/DictionaryChainExtension.Test.cs on lines 307..325
                            Test/DictionaryChainExtension.Test.cs on lines 398..416
                            Test/DictionaryChainExtension.Test.cs on lines 417..435

                            Duplicated Code

                            Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                            Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                            Tuning

                            This issue has a mass of 94.

                            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                            Refactorings

                            Further Reading

                            Method Create_Level3_Dictionary has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    [TestMethod]
                                    public void Create_Level3_Dictionary()
                                    {
                                        var result = target.ToDictionaryChain(
                                            (x) => x.FieldString,
                            Severity: Minor
                            Found in Test/DictionaryChainExtension.Test.cs - About 1 hr to fix
                              Severity
                              Category
                              Status
                              Source
                              Language