resgroup/customer-tests-excel

View on GitHub

Showing 124 of 124 total issues

File ExcelTabularPage.cs has 464 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
using DocumentFormat.OpenXml.VariantTypes;
using System;
Severity: Minor
Found in CustomerTestsExcel/ExcelTabularPage.cs - About 7 hrs to fix

    Class CodeNameToExcelNameConverter has 46 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public class CodeNameToExcelNameConverter : ICodeNameToExcelNameConverter
        {
            public string Specification =>
                "Specification";
    
    
    Severity: Minor
    Found in CustomerTestsExcel/CodeNameToExcelNameConverter.cs - About 6 hrs to fix

      Method Given has 151 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public override SpecificationSpecificAnovaCalculator Given()
              {
                  return
                      new SpecificationSpecificAnovaCalculator()
                      .VariableDescription_of("IQ")
      Severity: Major
      Found in SampleTests/Anova/One Way Anova.cs - About 6 hrs to fix

        Method GetCellValue has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
        Open

                private object GetCellValue(Cell cell)
                {
                    if (cell != null)
                    {
                        if (cell.DataType != null && cell.DataType.HasValue)
        Severity: Minor
        Found in CustomerTestsExcel/ExcelTabularPage.cs - About 5 hrs 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 Assertions has 103 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public override IEnumerable<IAssertion<SpecificationSpecificVermeulenNearWakeLengthCalculator>> Assertions()
                {
                    return new List<IAssertion<SpecificationSpecificVermeulenNearWakeLengthCalculator>>
                    {
                         new TableAssertion<SpecificationSpecificVermeulenNearWakeLengthCalculator, IVermeulenNearWakeLength>
        Severity: Major
        Found in SampleTests/Vermeulen Near Wake Length/VermeulenNearWakeLength.cs - About 4 hrs to fix

          Class HTMLTestOutputWriter has 32 methods (exceeds 20 allowed). Consider refactoring.
          Open

              public class HTMLTestOutputWriter : ITestOutputWriter
              {
                  protected StringBuilder writer;
                  protected int assemblyDivClassIndex;
                  protected int specificationDivClassIndex;
          Severity: Minor
          Found in CustomerTestsExcel/CodeOutputWriters/HTMLTestOutputWriter.cs - About 4 hrs to fix

            Method Given has 97 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public override SpecificationSpecificObjectWithPrimiiveLists Given()
                    {
                        return
                            new SpecificationSpecificObjectWithPrimiiveLists()
                            .IntegerTableSyntax_table_of(
            Severity: Major
            Found in SampleTests/PrimitiveLists/PrimitiveLists.cs - About 3 hrs to fix

              Class ICodeNameToExcelNameConverter has 31 methods (exceeds 20 allowed). Consider refactoring.
              Open

                  public interface ICodeNameToExcelNameConverter
                  {
                      string Specification { get; }
                      string Given { get; }
                      string WithProperties { get; }
              Severity: Minor
              Found in CustomerTestsExcel/ICodeNameToExcelNameConverter.cs - About 3 hrs to fix

                Class IdentityCodeNameToExcelNameConverter has 31 methods (exceeds 20 allowed). Consider refactoring.
                Open

                    internal class IdentityCodeNameToExcelNameConverter : ICodeNameToExcelNameConverter
                    {
                        // these are copied straight from CodeNameToExcelNameConverter, which
                        // seems like a code smell. I think this means that ICodeNameToExcelNameConverter
                        // fails the Interface Segregation Principle, and so should be split up into
                Severity: Minor
                Found in CustomerTestsExcel.Test/IdentityCodeNameToExcelNameConverter.cs - About 3 hrs to fix

                  Method Given has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public override SpecificationSpecificVermeulenNearWakeLengthCalculator Given()
                          {
                              return
                                  new SpecificationSpecificVermeulenNearWakeLengthCalculator()
                                  .VermeulenNearWakeLengthInputs_table_of(
                  Severity: Major
                  Found in SampleTests/Vermeulen Near Wake Length/VermeulenNearWakeLength.cs - About 3 hrs to fix

                    Class ExcelState has 30 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                        public class ExcelState
                        {
                            public ITabularPage Worksheet { get; private set; }
                            public uint Row { get; private set; }
                            public uint Column { get; private set; }
                    Severity: Minor
                    Found in CustomerTestsExcel/ExcelToCode/ExcelState.cs - About 3 hrs to fix

                      Class ExcelTestOutputWriter has 30 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                          public class ExcelTestOutputWriter : ExcelTestOutputWriterBase, ITestOutputWriter
                          {
                              public ExcelTestOutputWriter(
                                  ITabularLibrary excel,
                                  ICodeNameToExcelNameConverter namer,
                      Severity: Minor
                      Found in CustomerTestsExcel/CodeOutputWriters/ExcelTestOutputWriter.cs - About 3 hrs to fix

                        Method AddRow has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
                        Open

                                private void AddRow(Row row)
                                {
                                    rowLookupCache = null;
                                    rowLookupCacheAssociatedSheet = null;
                                    rowLookupCacheEnumerator = null;
                        Severity: Minor
                        Found in CustomerTestsExcel/ExcelTabularPage.cs - About 3 hrs 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

                        Class ExcelUnRoundTrippableTestOutputWriter has 28 methods (exceeds 20 allowed). Consider refactoring.
                        Open

                            public class ExcelUnRoundTrippableTestOutputWriter : ExcelTestOutputWriterBase, ITestOutputWriter
                            {
                                readonly IEnumerable<string> issuesPreventingRoundTrip;
                        
                                public ExcelUnRoundTrippableTestOutputWriter(

                          Class CombinedTestOutputWriter has 28 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                              public class CombinedTestOutputWriter : ITestOutputWriter
                              {
                                  protected readonly List<ITestOutputWriter> writers;
                          
                                  public CombinedTestOutputWriter(List<ITestOutputWriter> writers)
                          Severity: Minor
                          Found in CustomerTestsExcel/CodeOutputWriters/CombinedTestOutputWriter.cs - About 3 hrs to fix

                            Class StringTestOutputWriter has 28 methods (exceeds 20 allowed). Consider refactoring.
                            Open

                                public class StringTestOutputWriter : StringTestOutputWriterBase, ITestOutputWriter
                                {
                                    public StringTestOutputWriter(IHumanFriendlyFormatter formatter, ITextLineWriter writer) : base(formatter, writer)
                                    {
                                    }
                            Severity: Minor
                            Found in CustomerTestsExcel/CodeOutputWriters/StringTestOutputWriter.cs - About 3 hrs to fix

                              Class ITestOutputWriter has 28 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                                  public interface ITestOutputWriter
                                  {
                                      void Exception(string exception);
                              
                                      void StartSpecification(string specificationNamespace, string specificationName, string specificationDescription);
                              Severity: Minor
                              Found in CustomerTestsExcel/CodeOutputWriters/ITestOutputWriter.cs - About 3 hrs to fix

                                File CodeNameToExcelNameConverter.cs has 303 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                using System;
                                using System.Collections.Generic;
                                using System.Linq;
                                using System.Globalization;
                                using System.Text.RegularExpressions;
                                Severity: Minor
                                Found in CustomerTestsExcel/CodeNameToExcelNameConverter.cs - About 3 hrs to fix

                                  File ExcelTabularBook.cs has 302 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  using DocumentFormat.OpenXml;
                                  using DocumentFormat.OpenXml.Packaging;
                                  using DocumentFormat.OpenXml.Spreadsheet;
                                  using System;
                                  using System.IO;
                                  Severity: Minor
                                  Found in CustomerTestsExcel/ExcelTabularBook.cs - About 3 hrs to fix

                                    File ExcelToCodeThen.cs has 291 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    using System;
                                    using System.Collections.Generic;
                                    using System.Linq;
                                    
                                    namespace CustomerTestsExcel.ExcelToCode
                                    Severity: Minor
                                    Found in CustomerTestsExcel/ExcelToCode/ExcelToCodeThen.cs - About 3 hrs to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language