Showing 124 of 124 total issues
File ExcelTabularPage.cs
has 464 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
using DocumentFormat.OpenXml.VariantTypes;
using System;
Class CodeNameToExcelNameConverter
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class CodeNameToExcelNameConverter : ICodeNameToExcelNameConverter
{
public string Specification =>
"Specification";
Method Given
has 151 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override SpecificationSpecificAnovaCalculator Given()
{
return
new SpecificationSpecificAnovaCalculator()
.VariableDescription_of("IQ")
Method GetCellValue
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
Open
private object GetCellValue(Cell cell)
{
if (cell != null)
{
if (cell.DataType != null && cell.DataType.HasValue)
- Read upRead up
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
Open
public override IEnumerable<IAssertion<SpecificationSpecificVermeulenNearWakeLengthCalculator>> Assertions()
{
return new List<IAssertion<SpecificationSpecificVermeulenNearWakeLengthCalculator>>
{
new TableAssertion<SpecificationSpecificVermeulenNearWakeLengthCalculator, IVermeulenNearWakeLength>
Class HTMLTestOutputWriter
has 32 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class HTMLTestOutputWriter : ITestOutputWriter
{
protected StringBuilder writer;
protected int assemblyDivClassIndex;
protected int specificationDivClassIndex;
Method Given
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override SpecificationSpecificObjectWithPrimiiveLists Given()
{
return
new SpecificationSpecificObjectWithPrimiiveLists()
.IntegerTableSyntax_table_of(
Class ICodeNameToExcelNameConverter
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public interface ICodeNameToExcelNameConverter
{
string Specification { get; }
string Given { get; }
string WithProperties { get; }
Class IdentityCodeNameToExcelNameConverter
has 31 methods (exceeds 20 allowed). Consider refactoring. Open
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
Method Given
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override SpecificationSpecificVermeulenNearWakeLengthCalculator Given()
{
return
new SpecificationSpecificVermeulenNearWakeLengthCalculator()
.VermeulenNearWakeLengthInputs_table_of(
Class ExcelState
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class ExcelState
{
public ITabularPage Worksheet { get; private set; }
public uint Row { get; private set; }
public uint Column { get; private set; }
Class ExcelTestOutputWriter
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class ExcelTestOutputWriter : ExcelTestOutputWriterBase, ITestOutputWriter
{
public ExcelTestOutputWriter(
ITabularLibrary excel,
ICodeNameToExcelNameConverter namer,
Method AddRow
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
Open
private void AddRow(Row row)
{
rowLookupCache = null;
rowLookupCacheAssociatedSheet = null;
rowLookupCacheEnumerator = null;
- Read upRead up
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
Open
public class ExcelUnRoundTrippableTestOutputWriter : ExcelTestOutputWriterBase, ITestOutputWriter
{
readonly IEnumerable<string> issuesPreventingRoundTrip;
public ExcelUnRoundTrippableTestOutputWriter(
Class CombinedTestOutputWriter
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class CombinedTestOutputWriter : ITestOutputWriter
{
protected readonly List<ITestOutputWriter> writers;
public CombinedTestOutputWriter(List<ITestOutputWriter> writers)
Class StringTestOutputWriter
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class StringTestOutputWriter : StringTestOutputWriterBase, ITestOutputWriter
{
public StringTestOutputWriter(IHumanFriendlyFormatter formatter, ITextLineWriter writer) : base(formatter, writer)
{
}
Class ITestOutputWriter
has 28 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public interface ITestOutputWriter
{
void Exception(string exception);
void StartSpecification(string specificationNamespace, string specificationName, string specificationDescription);
File CodeNameToExcelNameConverter.cs
has 303 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.Linq;
using System.Globalization;
using System.Text.RegularExpressions;
File ExcelTabularBook.cs
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
using System;
using System.IO;
File ExcelToCodeThen.cs
has 291 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.Linq;
namespace CustomerTestsExcel.ExcelToCode