onebeyond/onebeyond-studio-core

View on GitHub

Showing 368 of 368 total issues

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

        TEntityId id,
        DateTimeOffset? dateFrom = null,
        DateTimeOffset? dateTo = null,
        Paging paging = null,
        CancellationToken cancellationToken = default)

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

            Expression<Func<TEntity, bool>>? preFilter,
            Expression<Func<TResultDto, bool>>? filter = default,
            Paging? paging = default,
            IReadOnlyCollection<Sorting<TResultDto>>? sortings = default,
            CancellationToken cancellationToken = default);

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

              Expression<Func<TEntity, bool>>? preFilter,
              Expression<Func<TResultDto, bool>>? filter = null,
              Paging? paging = null,
              IReadOnlyCollection<Sorting<TResultDto>>? sortings = null,
              CancellationToken cancellationToken = default)
      Severity: Minor
      Found in src/OneBeyond.Studio.DataAccess.EFCore/Repositories/BaseRORepository.cs - About 35 mins to fix

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

                this IRORepository<TEntity, TEntityId> roRepository,
                Expression<Func<TResultDto, bool>>? filter = default,
                Paging? paging = default,
                IReadOnlyCollection<Sorting<TResultDto>>? sortings = default,
                CancellationToken cancellationToken = default)

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

                  Expression<Func<TEntity, bool>>? filter = null,
                  Includes<TEntity>? includes = null,
                  Paging? paging = null,
                  IReadOnlyCollection<Sorting<TEntity>>? sortings = null,
                  CancellationToken cancellationToken = default)
          Severity: Minor
          Found in src/OneBeyond.Studio.DataAccess.EFCore/Repositories/BaseRORepository.cs - About 35 mins to fix

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

                    IEnumerable<EventEntry> allChanges,
                    AuditEvent auditEventEntity,
                    ReferenceEntry navigation,
                    Type navigationType,
                    string navigationName)

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

                  internal Includes(Includes<TEntity> previous, Expression<Func<TChild, TNextChild>> navigation)
                      : base(previous)
                  {
                      EnsureArg.IsNotNull(navigation, nameof(navigation));
              
              
              src/OneBeyond.Studio.Application.SharedKernel/Specifications/Includes.cs on lines 146..153

              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

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

                      query = includesTraits.HaveWhereClause
                          ? includes.Replay(new EFPlusIncludes<TEntity>(query)).GetQuery() // Seems like EFCoreIncludes can be used all the time as they got support for Where
                          : includes.Replay(new EFCoreIncludes<TEntity>(query)).GetQuery();
              src/OneBeyond.Studio.DataAccess.EFCore/Repositories/BaseRORepository.cs on lines 222..224

              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

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

                  internal Includes(Includes<TEntity> previous, Expression<Func<TEntity, TChild>> navigation)
                      : this(previous)
                  {
                      EnsureArg.IsNotNull(navigation, nameof(navigation));
              
              
              src/OneBeyond.Studio.Application.SharedKernel/Specifications/Includes.cs on lines 292..299

              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

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

                      query = includesTraits.HaveWhereClause
                          ? includes.Replay(new EFPlusIncludes<TEntity>(query)).GetQuery() // Seems like EFCoreIncludes can be used all the time as they got support for Where
                          : includes.Replay(new EFCoreIncludes<TEntity>(query)).GetQuery();
              src/OneBeyond.Studio.DataAccess.EFCore/Repositories/AggregateRootRWRepository.cs on lines 119..121

              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

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

                  {
                      if (!_auditConverterFuncs.TryGetValue(entityType, out var auditConverterFunc))
                      {
                          auditConverterFunc = CreateConvertFunc(entityType);
                          _auditConverterFuncs.AddOrUpdate(entityType, auditConverterFunc, (type, function) => function);
              src/OneBeyond.Studio.EntityAuditing/OneBeyond.Studio.EntityAuditing.Infrastructure/AuditWriterFactory.cs on lines 22..29

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

              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

              {
                  /// <summary>
                  /// </summary>
                  public Delete(TAggregateRootId aggregateRootId)
                  {
              src/OneBeyond.Studio.Application.SharedKernel/Entities/Queries/GetById.cs on lines 17..28
              src/OneBeyond.Studio.Domain.SharedKernel/Entities/Commands/Create.cs on lines 18..29

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

              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

              {
                  /// <summary>
                  /// </summary>
                  public Create(TAggregateRootCreateDto aggregateRootCreateDto)
                  {
              src/OneBeyond.Studio.Application.SharedKernel/Entities/Queries/GetById.cs on lines 17..28
              src/OneBeyond.Studio.Domain.SharedKernel/Entities/Commands/Delete.cs on lines 15..26

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

              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

                  {
                      if (!_auditWriterWriterFuncs.TryGetValue(entityType, out var auditWriterWriteFunc))
                      {
                          auditWriterWriteFunc = CreateWriteFunc(entityType);
                          _auditWriterWriterFuncs.AddOrUpdate(entityType, auditWriterWriteFunc, (type, function) => function);
              src/OneBeyond.Studio.EntityAuditing/OneBeyond.Studio.EntityAuditing.SqlServer/AuditDbConverterFactory.cs on lines 22..29

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

              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

              {
                  /// <summary>
                  /// </summary>
                  public GetById(TEntityId entityId)
                  {
              src/OneBeyond.Studio.Domain.SharedKernel/Entities/Commands/Create.cs on lines 18..29
              src/OneBeyond.Studio.Domain.SharedKernel/Entities/Commands/Delete.cs on lines 15..26

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

              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

                  {
                      EnsureArg.IsNotNull(preSaveDomainEventDispatcher, nameof(preSaveDomainEventDispatcher));
                      EnsureArg.IsNotNull(ambientContextAccessors, nameof(ambientContextAccessors));
              
                      _preSaveDomainEventDispatcher = preSaveDomainEventDispatcher;
              src/OneBeyond.Studio.Application.SharedKernel/RequestAuditors/RequestAuditor.cs on lines 20..26

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

              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

                  {
                      EnsureArg.IsNotNull(requestAuditRecordBuilder, nameof(requestAuditRecordBuilder));
                      EnsureArg.IsNotNull(requestAuditRecordWriters, nameof(requestAuditRecordWriters));
              
                      _requestAuditRecordBuilder = requestAuditRecordBuilder;
              src/OneBeyond.Studio.DataAccess.EFCore/DomainEvents/DomainEventsProcessor.cs on lines 31..37

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

              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

                      var queryProps = new Dictionary<string, IReadOnlyCollection<string>>
                          {
                              { nameof(TestModel.NullableDate), new[] { $"{DateTime.Today} & {DateTime.Today.AddDays(1)}" } }
                          };
              src/OneBeyond.Studio.Application.SharedKernel.Tests/Specifications/FilterExpressionBuilderTests.cs on lines 139..142

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

              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 static IServiceCollection AddDomainEventRelayAsBackgroundService(
                      this IServiceCollection services,
                      Action<ContainerBuilder>? configureServices = default)
                  {
                      EnsureArg.IsNotNull(services, nameof(services));
              src/OneBeyond.Studio.Hosting/DependencyInjection/ServiceCollectionExtensions.cs on lines 128..137

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

              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 static IServiceCollection AddIntegrationEventRelayAsBackgroundService(
                      this IServiceCollection services,
                      Action<ContainerBuilder>? configureServices = default)
                  {
                      EnsureArg.IsNotNull(services, nameof(services));
              src/OneBeyond.Studio.Hosting/DependencyInjection/ServiceCollectionExtensions.cs on lines 22..31

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

              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