Skip to content

Conversation

@StrangeWill
Copy link
Contributor

No description provided.

public class ExceptionHandlerMiddlewareTests
{

[Fact]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Method OnlyLogsOnce has 27 lines of code (exceeds 25 allowed). Consider refactoring.

Inspired by RollbarSharp, great library, just required too many tweaks to make play with .NET core well in my opinion.

# Testing
## Testing

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First header should be a top level header

CHANGELOG.md Outdated
<sup>Released: 2017/8/20</sup>

## Features
###### Features

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header levels should only increment by one level at a time

CHANGELOG.md Outdated
<sup>Released: 2017/4/21</sup>

## Features
###### Features

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header levels should only increment by one level at a time

CHANGELOG.md Outdated
<sup>Released: 2017/3/10</sup>

## Features
###### Features

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header levels should only increment by one level at a time

CHANGELOG.md Outdated
<sup>Released: 2017/2/26</sup>

## Features
###### Features

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header levels should only increment by one level at a time

CHANGELOG.md Outdated
<sup>Released: 2016/9/30</sup>

## Features
###### Features

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Header levels should only increment by one level at a time

# 0.7.0
# Releases

## 0.8.0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First header should be a top level header

this.RollbarMock.Setup(m => m.SendMessage(It.IsAny<RollbarLevel>(), It.IsAny<string>())).Returns(() => Task.FromResult<Payloads.Response>(null));
this.Logger = new RollbarDotNetLogger(this.RollbarMock.Object);
RollbarMock = new Mock<Rollbar>(null, null, null);
RollbarMock.Setup(m => m.SendException(It.IsAny<RollbarLevel>(), It.IsAny<Exception>())).Returns(() => Task.FromResult<Payloads.Response>(null));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

public KestrelTests()
{
RollbarMock = new Mock<Rollbar>(null, null, null);
RollbarMock.Setup(m => m.SendException(It.IsAny<RollbarLevel>(), It.IsAny<Exception>())).Returns(() => Task.FromResult<Payloads.Response>(null));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

this.Logger = new RollbarDotNetLogger(this.RollbarMock.Object);
RollbarMock = new Mock<Rollbar>(null, null, null);
RollbarMock.Setup(m => m.SendException(It.IsAny<RollbarLevel>(), It.IsAny<Exception>())).Returns(() => Task.FromResult<Payloads.Response>(null));
RollbarMock.Setup(m => m.SendMessage(It.IsAny<RollbarLevel>(), It.IsAny<string>())).Returns(() => Task.FromResult<Payloads.Response>(null));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

{
RollbarMock = new Mock<Rollbar>(null, null, null);
RollbarMock.Setup(m => m.SendException(It.IsAny<RollbarLevel>(), It.IsAny<Exception>())).Returns(() => Task.FromResult<Payloads.Response>(null));
RollbarMock.Setup(m => m.SendMessage(It.IsAny<RollbarLevel>(), It.IsAny<string>())).Returns(() => Task.FromResult<Payloads.Response>(null));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit 00e7f6d and detected 33 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 7
Duplication 24
Style 2

View more on Code Climate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants