guibranco/VTEX-SDK-dotnet

View on GitHub

Showing 31 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

      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

            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
                      Severity
                      Category
                      Status
                      Source
                      Language