Anapher/Strive

View on GitHub

Showing 735 of 735 total issues

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

            return _mediator.SetupSequence(x =>
                x.Send(It.Is<FetchAvailableScenesRequest>(x => x.ConferenceId == ConferenceId && x.RoomId == RoomId),
                    It.IsAny<CancellationToken>()));
src/Services/ConferenceManagement/Strive.Core.Tests/Services/Scenes/UseCases/UpdateScenesUseCaseTests.cs on lines 49..52

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

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 async Task HashGetAsync_KeyDoesNotExist_ReturnNull()
        {
            const string key = "test";
            const string field = "field1";
src/Services/ConferenceManagement/Strive.Infrastructure.Tests/KeyValue/InMemory/InMemoryKeyValueDatabaseTests.cs on lines 192..203

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

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

using System;
using System.Linq.Expressions;
using Strive.Core.Domain.Entities;
using SpeciVacation;

src/Services/ConferenceManagement/Strive.Core/Specifications/ConferenceLinkByConference.cs on lines 1..23

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

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

   extraReducers: {
      ...synchronizeObjectState([
         { type: 'exactId', syncObjId: MEDIA, propertyName: 'synchronized' },
         { type: 'single', baseId: EQUIPMENT, propertyName: 'equipment' },
      ]),
Severity: Minor
Found in src/Web/WebSPA/Client/src/features/media/reducer.ts and 1 other location - About 40 mins to fix
src/Web/WebSPA/Client/src/features/scenes/reducer.ts on lines 27..32

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

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 async Task HashExistsAsync_KeyDoesNotExist_ReturnFalse()
        {
            const string key = "test";
            const string field = "field";
src/Services/ConferenceManagement/Strive.Infrastructure.Tests/KeyValue/InMemory/InMemoryKeyValueDatabaseTests.cs on lines 91..102

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

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

            _mediator.Setup(x =>
                    x.Send(
                        It.Is<FetchAvailableScenesRequest>(x => x.ConferenceId == ConferenceId && x.RoomId == RoomId),
                        It.IsAny<CancellationToken>()))
src/Services/ConferenceManagement/Strive.Core.Tests/Services/Scenes/UseCases/UpdateScenesUseCaseTests.cs on lines 58..60

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

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

   extraReducers: {
      ...synchronizeObjectState([
         { type: 'single', baseId: SCENE, propertyName: 'synchronized' },
         { type: 'single', baseId: SCENE_TALKINGSTICK, propertyName: 'talkingStick' },
      ]),
Severity: Minor
Found in src/Web/WebSPA/Client/src/features/scenes/reducer.ts and 1 other location - About 40 mins to fix
src/Web/WebSPA/Client/src/features/media/reducer.ts on lines 42..47

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

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

            _subscriptionRepo.Setup(x => x.GetSet(_participant, It.IsAny<IReadOnlyList<string>>()))
                .ReturnsAsync(new List<string> {syncObjId.ToString()});
src/Services/ConferenceManagement/Strive.Core.Tests/Services/Synchronization/UseCases/UpdateSubscriptionsUseCaseTests.cs on lines 185..186

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

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

            _subscriptionRepo.Setup(x => x.GetSet(_participant, It.IsAny<IReadOnlyList<string>>()))
                .ReturnsAsync(new List<string> {oldSyncObjId.ToString()});
src/Services/ConferenceManagement/Strive.Core.Tests/Services/Synchronization/UseCases/UpdateSubscriptionsUseCaseTests.cs on lines 159..160

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

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

Function wrapControl has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

   source: ProducerSource,
   device: AnyInputDevice | undefined,
   local: UseMediaState,
   equipment: Record<string, EquipmentConnection> | undefined,
   dispatch: Dispatch<any>,
Severity: Minor
Found in src/Web/WebSPA/Client/src/features/media/useDeviceManagement.ts - About 35 mins to fix

    Function conferenceFactory has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

       id: string,
       workers: MediaSoupWorkers,
       repository: ConferenceRepository,
       rabbit: RabbitMqConn,
       { routerOptions, webrtcOptions, maxIncomingBitrate }: ConferenceManagerOptions,
    Severity: Minor
    Found in src/Services/SFU/src/lib/conference/conference-factory.ts - About 35 mins to fix

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

          public record SynchronizedPoll(string Id, PollInstruction Instruction, PollConfig Config, PollState State,
              DateTimeOffset CreatedOn)

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

                ValueTask<SceneUpdate> IsUpdateRequired(string conferenceId, string roomId, string syncObjId,
                    object synchronizedObject, object? previousValue);

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

                  protected abstract ValueTask<bool> InternalIsUpdateRequired(string conferenceId, string roomId,
                      string syncObjId, object synchronizedObject, object? previousValue);

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

                    public override Error? ReadJson(JsonReader reader, Type objectType, Error? existingValue, bool hasExistingValue,
                        JsonSerializer serializer)

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

                      private static async ValueTask<RedisResult> RoomRepository_SetParticipantRoom(IKeyValueDatabaseActions actions,
                          string roomMappingKey, string roomListKey, string participantId, string newRoomId)

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

                            IKeyValueDatabaseActions actions, string participantId, string participantKey, string conferenceKeyTemplate,
                            string connectionId)

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

                          public async ValueTask<SceneUpdate> IsUpdateRequired(string conferenceId, string roomId, string syncObjId,
                              object synchronizedObject, object? previousValue)

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

                        public record CreatePollRequest(string ConferenceId, PollInstruction Instruction, PollConfig Config,
                            PollState InitialState, string? RoomId) : IRequest<string>;

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

                          public record SendEquipmentCommandNotification(Participant Participant, string ConnectionId, ProducerSource Source,
                              string? DeviceId, EquipmentCommandType Action) : INotification;
                        Severity
                        Category
                        Status
                        Source
                        Language