guibranco/VTEX-SDK-dotnet

View on GitHub

Showing 51 of 51 total issues

Method NotifyOrderShippedAsync has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public async Task<string> NotifyOrderShippedAsync(
            string orderId,
            ShippingNotification notification,
            CancellationToken token
        )
Severity: Minor
Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

    Method UpdatePriceAsync has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public async Task UpdatePriceAsync(Price price, int skuId, CancellationToken token)
            {
                try
                {
                    var oldPrice = await GetPriceAsync(skuId).ConfigureAwait(false);
    Severity: Minor
    Found in Src/VTEX/VTEXContext.cs - About 1 hr to fix

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

      namespace VTEX.Transport
      {
          using Newtonsoft.Json;
      
          /// <summary>
      Severity: Major
      Found in Src/VTEX/Transport/ItemOfPackage.cs and 2 other locations - About 1 hr to fix
      Src/VTEX/Transport/CurrencyFormatInfo.cs on lines 14..60
      Src/VTEX/Transport/Paging.cs on lines 14..59

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

      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

      namespace VTEX.Transport
      {
          using Newtonsoft.Json;
      
          /// <summary>
      Severity: Major
      Found in Src/VTEX/Transport/Paging.cs and 2 other locations - About 1 hr to fix
      Src/VTEX/Transport/CurrencyFormatInfo.cs on lines 14..60
      Src/VTEX/Transport/ItemOfPackage.cs on lines 14..59

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

      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

      namespace VTEX.Transport
      {
          using Newtonsoft.Json;
      
          /// <summary>
      Severity: Major
      Found in Src/VTEX/Transport/CurrencyFormatInfo.cs and 2 other locations - About 1 hr to fix
      Src/VTEX/Transport/ItemOfPackage.cs on lines 14..59
      Src/VTEX/Transport/Paging.cs on lines 14..59

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

      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

      namespace VTEX.GoodPractices
      {
          using System;
          using System.Runtime.Serialization;
      
      
      Src/VTEX/GoodPractices/PaymentNotificationOrderException.cs on lines 14..56
      Src/VTEX/GoodPractices/TrackingNotificationOrderException.cs on lines 14..54

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

      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

      namespace VTEX.GoodPractices
      {
          using System;
          using System.Runtime.Serialization;
      
      
      Src/VTEX/GoodPractices/PaymentNotificationOrderException.cs on lines 14..56
      Src/VTEX/GoodPractices/ShippingNotificationOrderException.cs on lines 14..56

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

      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

      namespace VTEX.GoodPractices
      {
          using System;
          using System.Runtime.Serialization;
      
      
      Src/VTEX/GoodPractices/ShippingNotificationOrderException.cs on lines 14..56
      Src/VTEX/GoodPractices/TrackingNotificationOrderException.cs on lines 14..54

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

      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 ServiceInvokerInternal has 8 arguments (exceeds 4 allowed). Consider refactoring.
      Open

                  HttpRequestMethod method,
                  string endpoint,
                  CancellationToken token,
                  string data,
                  UriBuilder uriBuilder,
      Severity: Major
      Found in Src/VTEX/VTEXWrapper.cs - About 1 hr to fix

        Method GetOrderInternal has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring.
        Open

                private Order GetOrderInternal(string orderId)
                {
                    LogConsumer.Trace("Getting order {0}", orderId);
                    var json = _wrapper
                        .ServiceInvokerAsync(
        Severity: Minor
        Found in Src/VTEX/VTEXContext.cs - About 55 mins 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 GetOrdersListInternal has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                    string status = null,
                    DateTime? startDate = null,
                    DateTime? endDate = null,
                    string salesChannel = null,
                    string affiliatedId = null,
        Severity: Major
        Found in Src/VTEX/VTEXContext.cs - About 50 mins to fix

          Method GetHostData has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                      ref string endpoint,
                      ref Dictionary<string, string> queryString,
                      RequestEndpoint restEndpoint,
                      ref Cookie cookie,
                      ref string protocol,
          Severity: Major
          Found in Src/VTEX/VTEXWrapper.cs - About 50 mins to fix

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

            namespace VTEX.Transport
            {
                using Newtonsoft.Json;
            
                /// <summary>
            Severity: Minor
            Found in Src/VTEX/Transport/TrackingHints.cs and 1 other location - About 45 mins to fix
            Src/VTEX/Transport/Seller.cs on lines 14..52

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

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

            namespace VTEX.Transport
            {
                using Newtonsoft.Json;
            
                /// <summary>
            Severity: Minor
            Found in Src/VTEX/Transport/Seller.cs and 1 other location - About 45 mins to fix
            Src/VTEX/Transport/TrackingHints.cs on lines 14..53

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

            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 HandleException has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                        Exception exception,
                        HttpResponseMessage response,
                        Uri uri,
                        HttpRequestMethod method,
                        string data,
            Severity: Minor
            Found in Src/VTEX/VTEXWrapper.cs - About 45 mins to fix

              Method ServiceInvokerAsync has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                          HttpRequestMethod method,
                          [Localizable(false)] string endpoint,
                          CancellationToken token,
                          Dictionary<string, string> queryString = null,
                          string data = null,
              Severity: Minor
              Found in Src/VTEX/VTEXWrapper.cs - About 45 mins to fix

                Method RequestInternalAsync has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                            HttpRequestMethod method,
                            CancellationToken token,
                            string data,
                            HttpClient client,
                            UriBuilder uriBuilder
                Severity: Minor
                Found in Src/VTEX/VTEXWrapper.cs - About 35 mins to fix

                  Method GetBridgeItems has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                              [Localizable(false)] string query,
                              [Localizable(false)] string sort,
                              [Localizable(false)] string keywords,
                              int offSet,
                              int limit
                  Severity: Minor
                  Found in Src/VTEX/VTEXContext.cs - About 35 mins to fix

                    Method GetAllBridgeItems has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                                [Localizable(false)] string query,
                                [Localizable(false)] string sort,
                                [Localizable(false)] string keywords,
                                [Localizable(false)] string facetName,
                                [Localizable(false)] string facetValue
                    Severity: Minor
                    Found in Src/VTEX/VTEXContext.cs - About 35 mins to fix

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

                      namespace VTEX.GoodPractices
                      {
                          using System;
                          using System.Runtime.Serialization;
                      
                      
                      Severity: Major
                      Found in Src/VTEX/GoodPractices/BridgeException.cs and 3 other locations - About 35 mins to fix
                      Src/VTEX/GoodPractices/TransactionException.cs on lines 14..45
                      Src/VTEX/GoodPractices/UpdatePriceInfoSKUException.cs on lines 14..44
                      Src/VTEX/GoodPractices/UpdateStockInfoSKUException.cs on lines 14..44

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

                      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