guibranco/CrispyWaffle

View on GitHub

Showing 121 of 121 total issues

Method ExistsInternal has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private bool ExistsInternal(string path)
        {
            try
            {
                LogConsumer.Info(
Severity: Minor
Found in Src/CrispyWaffle.Utils/Communications/FtpClient.cs - About 1 hr to fix

    Method CreateInternal has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            private bool CreateInternal(string path, byte[] bytes)
            {
                var result = false;
                try
                {
    Severity: Minor
    Found in Src/CrispyWaffle.Utils/Communications/FtpClient.cs - About 1 hr to fix

      Method GetEnumByHumanReadableAttribute has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public static T GetEnumByHumanReadableAttribute<T>(string humanReadableValue)
              {
                  var type = typeof(T);
                  if (!type.IsEnum)
                  {
      Severity: Minor
      Found in Src/CrispyWaffle/Extensions/EnumExtensions.cs - About 1 hr to fix

        Method TryToDateTime has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public static bool TryToDateTime(this string input, out DateTime value)
                {
                    value = DateTime.MinValue;
                    if (string.IsNullOrWhiteSpace(input))
                    {
        Severity: Minor
        Found in Src/CrispyWaffle/Extensions/ConversionExtensions.cs - About 1 hr to fix

          Method SendAsync has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  public async Task SendAsync()
                  {
                      var cacheKey = TypeExtensions.GetCallingMethod();
          
                      string eml;
          Severity: Minor
          Found in Src/CrispyWaffle.Utils/Communications/SmtpMailer.cs - About 1 hr to fix

            Method GetSerializer has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    [Pure]
                    private static SerializerConverter<T> GetSerializer<T>(T obj, SerializerAttribute attribute)
                        where T : class
                    {
                        switch (attribute.Format)
            Severity: Minor
            Found in Src/CrispyWaffle/Serialization/SerializerFactory.cs - About 1 hr to fix

              Method AddFromType has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public QueryStringBuilder AddFromType<T>(
                          T instance,
                          bool convertCamelCaseToUnderscore = true
                      )
                      {
              Severity: Minor
              Found in Src/CrispyWaffle/Utilities/QueryStringBuilder.cs - About 1 hr to fix

                Method ResolveMultipleConstructors has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        private static ConstructorInfo ResolveMultipleConstructors(
                            ConstructorInfo[] constructors,
                            Type parentType = null
                        )
                        {
                Severity: Minor
                Found in Src/CrispyWaffle/Composition/ServiceLocator.cs - About 1 hr to fix

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

                          public void Trace(string category, Exception exception)
                          {
                              if (!_level.HasFlag(LogLevel.Trace))
                              {
                                  return;
                  Severity: Major
                  Found in Src/CrispyWaffle.Redis/Log/PubSubRedisLogProvider.cs and 1 other location - About 1 hr to fix
                  Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs on lines 293..307

                  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 109.

                  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

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

                          public void Trace(string category, Exception exception)
                          {
                              if (!_level.HasFlag(LogLevel.Trace))
                              {
                                  return;
                  Severity: Major
                  Found in Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs and 1 other location - About 1 hr to fix
                  Src/CrispyWaffle.Redis/Log/PubSubRedisLogProvider.cs on lines 255..269

                  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 109.

                  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

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

                          {
                              if (!_level.HasFlag(LogLevel.Debug))
                              {
                                  return;
                              }
                  Severity: Major
                  Found in Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs and 1 other location - About 1 hr to fix
                  Src/CrispyWaffle.Redis/Log/PubSubRedisLogProvider.cs on lines 317..334

                  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 107.

                  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

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

                          {
                              if (!_level.HasFlag(LogLevel.Debug))
                              {
                                  return;
                              }
                  Severity: Major
                  Found in Src/CrispyWaffle.Redis/Log/PubSubRedisLogProvider.cs and 1 other location - About 1 hr to fix
                  Src/CrispyWaffle.RabbitMQ/Log/RabbitMQLogProvider.cs on lines 355..373

                  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 107.

                  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 Levenshtein has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          [Pure]
                          public static int Levenshtein(this string input, string inputToCompare)
                          {
                              var n = input.Length;
                  
                  Severity: Minor
                  Found in Src/CrispyWaffle/Extensions/StringExtensions.cs - About 1 hr to fix

                    Method ConfigureSource has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            private static void ConfigureSource(EventLog log, string source)
                            {
                                var sourceData = new EventSourceCreationData(source, log.Log)
                                {
                                    MachineName = log.MachineName
                    Severity: Minor
                    Found in Src/CrispyWaffle.Eventlog/Log/Adapters/EventLogAdapter.cs - About 1 hr to fix

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

                              public static string GetIndexName<T>()
                                  where T : class, IIndexable, new()
                              {
                                  var type = typeof(T);
                                  return
                      Severity: Major
                      Found in Src/CrispyWaffle.ElasticSearch/Helpers/Extensions.cs and 2 other locations - About 1 hr to fix
                      Src/CrispyWaffle.RabbitMQ/Helpers/Extensions.cs on lines 13..23
                      Src/CrispyWaffle.RabbitMQ/Helpers/Extensions.cs on lines 30..41

                      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 103.

                      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 3 locations. Consider refactoring.
                      Open

                              public static string GetQueueName<T>()
                                  where T : class, IQueuing, new()
                              {
                                  var type = typeof(T);
                      
                      Severity: Major
                      Found in Src/CrispyWaffle.RabbitMQ/Helpers/Extensions.cs and 2 other locations - About 1 hr to fix
                      Src/CrispyWaffle.ElasticSearch/Helpers/Extensions.cs on lines 25..35
                      Src/CrispyWaffle.RabbitMQ/Helpers/Extensions.cs on lines 13..23

                      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 103.

                      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 3 locations. Consider refactoring.
                      Open

                              public static string GetExchangeName<T>()
                                  where T : class, IQueuing, new()
                              {
                                  var type = typeof(T);
                                  return
                      Severity: Major
                      Found in Src/CrispyWaffle.RabbitMQ/Helpers/Extensions.cs and 2 other locations - About 1 hr to fix
                      Src/CrispyWaffle.ElasticSearch/Helpers/Extensions.cs on lines 25..35
                      Src/CrispyWaffle.RabbitMQ/Helpers/Extensions.cs on lines 30..41

                      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 103.

                      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 6 locations. Consider refactoring.
                      Open

                              public static void Info(string message)
                              {
                                  var category = GetCategory();
                      
                                  foreach (
                      Severity: Major
                      Found in Src/CrispyWaffle/Log/LogConsumer.cs and 5 other locations - About 1 hr to fix
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 312..326
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 391..405
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 503..517
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 533..547
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 563..577

                      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 102.

                      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 6 locations. Consider refactoring.
                      Open

                              public static void Trace(string message)
                              {
                                  var category = GetCategory();
                      
                                  foreach (
                      Severity: Major
                      Found in Src/CrispyWaffle/Log/LogConsumer.cs and 5 other locations - About 1 hr to fix
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 312..326
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 473..487
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 503..517
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 533..547
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 563..577

                      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 102.

                      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 6 locations. Consider refactoring.
                      Open

                              public static void Fatal(string message)
                              {
                                  var category = GetCategory();
                      
                                  foreach (
                      Severity: Major
                      Found in Src/CrispyWaffle/Log/LogConsumer.cs and 5 other locations - About 1 hr to fix
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 312..326
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 391..405
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 473..487
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 503..517
                      Src/CrispyWaffle/Log/LogConsumer.cs on lines 533..547

                      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 102.

                      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

                      Severity
                      Category
                      Status
                      Source
                      Language