Showing 31 of 51 total issues
Method NotifyOrderShippedAsync
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task<string> NotifyOrderShippedAsync(
string orderId,
ShippingNotification notification,
CancellationToken token
)
Method UpdatePriceAsync
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public async Task UpdatePriceAsync(Price price, int skuId, CancellationToken token)
{
try
{
var oldPrice = await GetPriceAsync(skuId).ConfigureAwait(false);
Method ServiceInvokerInternal
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
HttpRequestMethod method,
string endpoint,
CancellationToken token,
string data,
UriBuilder uriBuilder,
Method GetOrderInternal
has a Cognitive Complexity of 24 (exceeds 20 allowed). Consider refactoring. Open
Open
private Order GetOrderInternal(string orderId)
{
LogConsumer.Trace("Getting order {0}", orderId);
var json = _wrapper
.ServiceInvokerAsync(
- Read upRead up
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
Open
string status = null,
DateTime? startDate = null,
DateTime? endDate = null,
string salesChannel = null,
string affiliatedId = null,
Method GetHostData
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ref string endpoint,
ref Dictionary<string, string> queryString,
RequestEndpoint restEndpoint,
ref Cookie cookie,
ref string protocol,
Method HandleException
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
Exception exception,
HttpResponseMessage response,
Uri uri,
HttpRequestMethod method,
string data,
Method ServiceInvokerAsync
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
HttpRequestMethod method,
[Localizable(false)] string endpoint,
CancellationToken token,
Dictionary<string, string> queryString = null,
string data = null,
Method RequestInternalAsync
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
HttpRequestMethod method,
CancellationToken token,
string data,
HttpClient client,
UriBuilder uriBuilder
Method GetBridgeItems
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
[Localizable(false)] string query,
[Localizable(false)] string sort,
[Localizable(false)] string keywords,
int offSet,
int limit
Method GetAllBridgeItems
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
[Localizable(false)] string query,
[Localizable(false)] string sort,
[Localizable(false)] string keywords,
[Localizable(false)] string facetName,
[Localizable(false)] string facetValue