onebeyond/onebeyond-studio-core

View on GitHub

Showing 368 of 368 total issues

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

    public static ContainerBuilder AddAzureMessageQueue<TMessage>(
        this ContainerBuilder containerBuilder,
        AzureMessageQueueOptions options)
    {
        EnsureArg.IsNotNull(containerBuilder, nameof(containerBuilder));
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 74..88
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 106..120
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 10..23
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 60..73
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 96..109

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

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 ContainerBuilder AddRabbitMessageQueueReceiver<TMessage>(
        this ContainerBuilder containerBuilder,
        RabbitMessageQueueOptions options)
    {
        EnsureArg.IsNotNull(containerBuilder, nameof(containerBuilder));
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 41..55
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 74..88
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 106..120
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 10..23
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 60..73

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

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 ContainerBuilder AddAzureServiceBusMessageQueue<TMessage>(
        this ContainerBuilder containerBuilder,
        AzureServiceBusMessageQueueOptions options)
    {
        EnsureArg.IsNotNull(containerBuilder, nameof(containerBuilder));
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 41..55
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 106..120
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 10..23
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 60..73
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 96..109

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

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 ContainerBuilder AddRabbitMessageQueue<TMessage>(
        this ContainerBuilder containerBuilder,
        RabbitMessageQueueOptions options)
    {
        EnsureArg.IsNotNull(containerBuilder, nameof(containerBuilder));
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 41..55
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 74..88
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 106..120
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 10..23
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 96..109

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

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 ContainerBuilder AddRabbitPubSubMessageQueue<TMessage>(
        this ContainerBuilder containerBuilder,
        RabbitPubSubMessageQueueOptions options)
    {
        EnsureArg.IsNotNull(containerBuilder, nameof(containerBuilder));
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 41..55
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 74..88
src/OneBeyond.Studio.Infrastructure.Azure/MessageQueues/DependencyInjection/ContainerBuilderExtensions.cs on lines 106..120
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 60..73
src/OneBeyond.Studio.Infrastructure.RabbitMQ/DependencyInjection/ContainerBuilderExtensions.cs on lines 96..109

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

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

    private HttpContext GenerateMockHttpContext()
    {
        var request = new Mock<HttpRequest>();
        request.Setup(x => x.Body).Returns(GenerateStreamFromString(_testRequestData));

src/OneBeyond.Studio.Hosting.AspNet.Tests/ModelBinders/BindingContext/TestBindingContext.cs on lines 99..107

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

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

    private static HttpContext GenerateMockHttpContext()
    {
        var request = new Mock<HttpRequest>();
        request.Setup(x => x.Body).Returns(GenerateStreamFromString(TEST_REQUEST_BODY));

src/OneBeyond.Studio.Hosting.AspNet.Tests/ModelBinders/BindingContext/TestBodyBindingContext.cs on lines 84..92

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

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

    [Fact]
    public void TestListOfNotStringValuesProducesCorrectExpression()
    {
        var queryProperties = new Dictionary<string, IReadOnlyCollection<string>>
            {
src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 543..553

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

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

    [Fact]
    public void TestStringCollectionValuesProducesCorrectExpression()
    {
        var queryProperties = new Dictionary<string, IReadOnlyCollection<string>>
            {
src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 489..499

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

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

        protected override void BuildModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasDefaultSchema("audit")

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

            protected override void BuildTargetModel(ModelBuilder modelBuilder)
            {
    #pragma warning disable 612, 618
                modelBuilder
                    .HasDefaultSchema("audit")

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

          [Fact]
          public void TestStringStartsWithProducesCorrectExpression()
          {
              var queryProperties = new Dictionary<string, IReadOnlyCollection<string>>
                  {
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 378..388
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 390..400
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 402..412

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

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

          [Fact]
          public void TestStringEqualsProducesCorrectExpression()
          {
              var queryProperties = new Dictionary<string, IReadOnlyCollection<string>>
                  {
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 366..376
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 378..388
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 390..400

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

      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

          public CreateHandler(
              IRWRepository<TAggregateRoot, TAggregateRootId> rwRepository,
              IValidator<TAggregateRoot> validator,
              IMapper mapper)
          {
      src/OneBeyond.Studio.Application.SharedKernel/CommandHandlers/UpdateHandler.cs on lines 29..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 111.

      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

          [Fact]
          public void TestFileValidatorShouldAcceptImageOfLessThan400KB()
          {
              var validator = new FileValidatorBuilder()
                  .AllowImages()
      src/OneBeyond.Studio.Crosscuts.Tests/FileUploadValidators.cs on lines 271..290

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

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

          [Fact]
          public void TestStringEndsWithProducesCorrectExpression()
          {
              var queryProperties = new Dictionary<string, IReadOnlyCollection<string>>
                  {
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 366..376
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 390..400
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 402..412

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

      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

          [Fact]
          public void TestFileValidatorShouldNotAcceptImageOfMoreThan300KB()
          {
              var validator = new FileValidatorBuilder()
                  .AllowImages()
      src/OneBeyond.Studio.Crosscuts.Tests/FileUploadValidators.cs on lines 250..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 111.

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

          [Fact]
          public void TestStringContainsProducesCorrectExpression()
          {
              var queryProperties = new Dictionary<string, IReadOnlyCollection<string>>
                  {
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 366..376
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 378..388
      src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 402..412

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

      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

          public UpdateHandler(
              IRWRepository<TAggregateRoot, TAggregateRootId> rwRepository,
              IValidator<TAggregateRoot> validator,
              IMapper mapper)
          {
      src/OneBeyond.Studio.Application.SharedKernel/CommandHandlers/CreateHandler.cs on lines 32..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 111.

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

          private static Action<TAggregateRoot> CompileDataAccessFunction(DataAccessPolicy<TAggregateRoot>? dataAccessPolicy)
          {
              var isDataAccessAllowed1 = dataAccessPolicy?.CanBeAccessedCriteria?.Compile();
              var isDataAccessAllowed2 = dataAccessPolicy?.CanBeAccessedFunction;
              if (isDataAccessAllowed1 is null
        Severity
        Category
        Status
        Source
        Language