guibranco/Sankhya-SDK-dotnet

View on GitHub

Showing 145 of 326 total issues

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

[Entity("CabecalhoNota")]
public class InvoiceHeader : GenericServiceEntity, IEquatable<InvoiceHeader>
{
    /// <summary>
    /// Indicates whether the current object is equal to another object of the same type.
Severity: Minor
Found in Src/Sankhya/Transport/InvoiceHeader.cs - About 4 hrs to fix

    File InvoiceFollowUp.cs has 363 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using System.ComponentModel;
    using System.Diagnostics.CodeAnalysis;
    using System.Globalization;
    using CrispyWaffle.Extensions;
    using Sankhya.Attributes;
    Severity: Minor
    Found in Src/Sankhya/Transport/InvoiceFollowUp.cs - About 4 hrs to fix

      Method HandleService has 110 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private static void HandleService(ServiceRequest request, EntityResolverResult result)
          {
              switch (request.Service)
              {
                  case ServiceName.CrudFind:
      Severity: Major
      Found in Src/Sankhya/Helpers/ServiceRequestExtensions.cs - About 4 hrs to fix

        Method Equals has 108 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public bool Equals(Partner other)
            {
                if (ReferenceEquals(null, other))
                {
                    return false;
        Severity: Major
        Found in Src/Sankhya/Transport/Partner.cs - About 4 hrs to fix

          File SystemParameter.cs has 346 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          using System.ComponentModel;
          using System.Diagnostics.CodeAnalysis;
          using CrispyWaffle.Extensions;
          using Sankhya.Attributes;
          using Sankhya.Enums;
          Severity: Minor
          Found in Src/Sankhya/Transport/SystemParameter.cs - About 4 hrs to fix

            Method GetHashCode has 106 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                [SuppressMessage(
                    "ReSharper",
                    "NonReadonlyMemberInGetHashCode",
                    Justification = "Used to compute hash internally"
                )]
            Severity: Major
            Found in Src/Sankhya/Transport/Product.cs - About 4 hrs to fix

              Method GetHashCode has 104 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  [SuppressMessage(
                      "ReSharper",
                      "NonReadonlyMemberInGetHashCode",
                      Justification = "Used to compute hash internally"
                  )]
              Severity: Major
              Found in Src/Sankhya/Transport/Contact.cs - About 4 hrs to fix

                File EntityExtensions.cs has 320 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                using System.Globalization;
                using System.Reflection;
                using CrispyWaffle.Extensions;
                using CrispyWaffle.Log;
                using Sankhya.Attributes;
                Severity: Minor
                Found in Src/Sankhya/Helpers/EntityExtensions.cs - About 3 hrs to fix

                  Method GetHashCode has 89 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      [SuppressMessage(
                          "ReSharper",
                          "NonReadonlyMemberInGetHashCode",
                          Justification = "Used to compute hash internally"
                      )]
                  Severity: Major
                  Found in Src/Sankhya/Transport/InvoiceHeader.cs - About 3 hrs to fix

                    File PartnerComplement.cs has 310 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    using System.ComponentModel;
                    using System.Diagnostics.CodeAnalysis;
                    using Sankhya.Attributes;
                    
                    namespace Sankhya.Transport;
                    Severity: Minor
                    Found in Src/Sankhya/Transport/PartnerComplement.cs - About 3 hrs to fix

                      Method HandleExceptionInternal has 85 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private bool HandleExceptionInternal(
                              Exception exception,
                              ServiceName name,
                              ServiceCategory category,
                              ServiceRequest request,
                      Severity: Major
                      Found in Src/Sankhya/SankhyaWrapper.cs - About 3 hrs to fix

                        Method Equals has 82 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public bool Equals(InvoiceHeader other)
                            {
                                if (ReferenceEquals(null, other))
                                {
                                    return false;
                        Severity: Major
                        Found in Src/Sankhya/Transport/InvoiceHeader.cs - About 3 hrs to fix

                          Method ParseProperty has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring.
                          Open

                              private void ParseProperty<T>(
                                  T instance,
                                  ReferenceLevel maxInnerLevel,
                                  string prefix,
                                  ReferenceLevel currentLevel,
                          Severity: Minor
                          Found in Src/Sankhya/Helpers/EntityDynamicSerialization.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

                          Method Equals has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public bool Equals(Contact other)
                              {
                                  if (ReferenceEquals(null, other))
                                  {
                                      return false;
                          Severity: Major
                          Found in Src/Sankhya/Transport/Contact.cs - About 3 hrs to fix

                            File ProductInventory.cs has 301 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            using System.ComponentModel;
                            using System.Diagnostics.CodeAnalysis;
                            using CrispyWaffle.Extensions;
                            using CrispyWaffle.Serialization;
                            using Sankhya.Attributes;
                            Severity: Minor
                            Found in Src/Sankhya/Transport/ProductInventory.cs - About 3 hrs to fix

                              Class KnowServicesRequestWrapper has 27 methods (exceeds 20 allowed). Consider refactoring.
                              Open

                              public static class KnowServicesRequestWrapper
                              {
                                  /// <summary>
                                  /// The Sankhya context.
                                  /// </summary>
                              Severity: Minor
                              Found in Src/Sankhya/RequestWrappers/KnowServicesRequestWrapper.cs - About 3 hrs to fix

                                Class Product has 26 methods (exceeds 20 allowed). Consider refactoring.
                                Open

                                [Entity("Produto")]
                                public class Product : IEntity, IEquatable<Product>
                                {
                                    /// <summary>
                                    /// Indicates whether the current object is equal to another object of the same type.
                                Severity: Minor
                                Found in Src/Sankhya/Transport/Product.cs - About 3 hrs to fix

                                  File ResponseBody.cs has 289 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  using System.ComponentModel;
                                  using System.Xml.Serialization;
                                  using CrispyWaffle.Extensions;
                                  
                                  namespace Sankhya.Service;
                                  Severity: Minor
                                  Found in Src/Sankhya/Service/ResponseBody.cs - About 2 hrs to fix

                                    Method Resolve has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static void Resolve<T>(this ServiceRequest request)
                                            where T : class, IEntity, new()
                                        {
                                            if (request == null)
                                            {
                                    Severity: Major
                                    Found in Src/Sankhya/Helpers/ServiceRequestExtensions.cs - About 2 hrs to fix

                                      Method ParseResponseBodyElements has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private bool ParseResponseBodyElements(XmlReader reader)
                                          {
                                              var entities = new List<EntityDynamicSerialization>();
                                      
                                              switch (reader.LocalName)
                                      Severity: Major
                                      Found in Src/Sankhya/Service/ServiceResponse.cs - About 2 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language