Showing 326 of 326 total issues
Similar blocks of code found in 3 locations. Consider refactoring. Open
using CrispyWaffle.Attributes;
namespace Sankhya.Enums;
/// <summary>
- Read upRead up
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 207.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
using CrispyWaffle.Attributes;
namespace Sankhya.Enums;
/// <summary>
- Read upRead up
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 207.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
using CrispyWaffle.Attributes;
namespace Sankhya.Enums;
/// <summary>
- Read upRead up
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 207.
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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
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;
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)
{
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)
Class SimpleCrudRequestWrapper
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
public static class SimpleCrudRequestWrapper
{
/// <summary>
/// The Sankhya context.
/// </summary>
Class Contact
has 25 methods (exceeds 20 allowed). Consider refactoring. Open
[Entity("Contato")]
public class Contact : IEntity, IEquatable<Contact>
{
/// <summary>
/// Indicates whether the current object is equal to another object of the same type.
Method ProcessFieldsAndCriteria
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
private static void ProcessFieldsAndCriteria<T>(
ServiceRequest request,
T criteriaEntity,
ReferenceLevel currentLevel,
PropertyInfo propertyInfo,
Method Equals
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
public bool Equals(Product other)
{
if (ReferenceEquals(null, other))
{
return false;
File City.cs
has 280 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using CrispyWaffle.Serialization;
using Sankhya.Attributes;
File RequestBody.cs
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System.ComponentModel;
using System.Xml.Serialization;
namespace Sankhya.Service;
Method GetHashCode
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
[SuppressMessage(
"ReSharper",
"NonReadonlyMemberInGetHashCode",
Justification = "Used to compute hash internally"
)]
File SimpleCRUDRequestWrapper.cs
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
using CrispyWaffle.Composition;
using CrispyWaffle.Log;
using Sankhya.Enums;
using Sankhya.GoodPractices;
using Sankhya.Helpers;
Class InvoiceHeaderExclusion
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
[Entity("CabecalhoNotaExcluida")]
public class InvoiceHeaderExclusion : IEntity, IEquatable<InvoiceHeaderExclusion>
{
/// <summary>
/// Indicates whether the current object is equal to another object of the same type.
File Financial.cs
has 276 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;
Method GetImage
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
public ServiceFile GetImage(string entity, Dictionary<string, object> keys)
{
HttpWebResponse response = null;
try
{
Method Resolve
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void Resolve<T>(this ServiceRequest request, ICollection<T> criteriaList)
where T : class, IEntity, new()
{
if (request == null)
{
Method ServiceInvokerInternal
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
private ServiceResponse ServiceInvokerInternal(
ServiceRequest request,
ServiceName serviceName,
RequestRetryData retryData
)
Class Release
has 23 methods (exceeds 20 allowed). Consider refactoring. Open
[XmlType("liberacao")]
public sealed class Release
{
/// <summary>
/// The key