Anapher/Strive

View on GitHub

Showing 735 of 735 total issues

Function selectAvailableInputDevicesFactory has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

   createSelector(selectLocalDevices, selectEquipmentConnections, getSource, (devices, equipment, source) => {
      const result = new Array<DeviceGroup>();

      if (devices) {
         const localDevices = devices
Severity: Minor
Found in src/Web/WebSPA/Client/src/features/settings/selectors.tsx - About 1 hr to fix

    Function transportProduce has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

       public async transportProduce(
          { transportId, appData, kind, ...producerOptions }: TransportProduceRequest,
          connectionId: string,
       ): Promise<SuccessOrError<TransportProduceResponse>> {
          const connection = this.connections.get(connectionId);
    Severity: Minor
    Found in src/Services/SFU/src/lib/conference/conference.ts - About 1 hr to fix

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

              public async Task<Unit> Handle(UpdateSubscriptionsRequest request, CancellationToken cancellationToken)
              {
                  var participant = request.Participant;
      
                  _logger.LogDebug("Update subscriptions for {participant}", participant);

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

                public async Task<Unit> Handle(TalkingStickEnqueueRequest request, CancellationToken cancellationToken)
                {
                    var (participant, remove) = request;
        
                    var rooms = await _mediator.FetchSynchronizedObject<SynchronizedRooms>(participant.ConferenceId,

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

                  public async Task<SuccessOrError<Unit>> Handle(OpenBreakoutRoomsRequest request,
                      CancellationToken cancellationToken)
                  {
                      var (_, _, _, assignedRooms, conferenceId) = request;
          
          

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

                    public IEnumerable<ClusterBucket<T>> BuildCluster<T, TValue>(IEnumerable<T> data, Func<T, TValue> valueSelector,
                        IDistanceAlgorithm<TValue> distanceAlgorithm, double threshold)
                    {
                        var clusterBuckets = data.Select(x => new ClusterBucket<T>(new List<T> {x})).ToArray();
                        var entriesMatrix = new double?[clusterBuckets.Length, clusterBuckets.Length];

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

                      [Fact]
                      public async Task DisposeAsync_ThreadSafety()
                      {
                          // arrange
                          var readerWriterLock = new AsyncReaderWriterLock();

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

                        [Fact]
                        public async Task GlobalUndo_IsAvailable_ExecuteUndo()
                        {
                            // arrange
                            var useCase = Create();

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

                          [Fact]
                          public async Task GlobalRedo_IsAvailable_ExecuteRedo()
                          {
                              // arrange
                              var useCase = Create();

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

                            private async Task<LoginViewModel> BuildLoginViewModelAsync(string returnUrl)
                            {
                                var context = await _interaction.GetAuthorizationContextAsync(returnUrl);
                                if (context?.IdP != null && await _schemeProvider.GetSchemeAsync(context.IdP) != null)
                                {

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

                              public async Task<SuccessOrError<TResponse>> Send()
                              {
                                  var token = _context.Hub.Context.ConnectionAborted;
                      
                                  foreach (var middleware in _middlewares)

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

                                [HttpPatch("{conferenceId}")]
                                [Authorize]
                                public async Task<ActionResult> PatchConferenceLink(string conferenceId,
                                    JsonPatchDocument<ChangeConferenceLinkStarDto> patch, [FromServices] IConferenceLinkRepo repo,
                                    [FromServices] IOptions<ConcurrencyOptions> options)

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

                                  public async Task<SuccessOrError<Unit>> Handle(SetTemporaryPermissionRequest request,
                                      CancellationToken cancellationToken)
                                  {
                                      var (participant, permissionKey, value) = request;
                          
                          

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

                                        await conn.SyncObjects.AssertSyncObject(SynchronizedWhiteboards.SyncObjId(RoomOptions.DEFAULT_ROOM_ID),
                                            (SynchronizedWhiteboards whiteboards) =>
                                            {
                                                var whiteboard = whiteboards.Whiteboards[whiteboardId];
                                                Assert.True(whiteboard.ParticipantStates[conn.User.Sub].CanRedo);
                            src/Services/ConferenceManagement/Strive.IntegrationTests/Services/WhiteboardTests.cs on lines 326..331

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

                            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

                                        await conn.SyncObjects.AssertSyncObject(SynchronizedWhiteboards.SyncObjId(RoomOptions.DEFAULT_ROOM_ID),
                                            (SynchronizedWhiteboards whiteboards) =>
                                            {
                                                var whiteboard = whiteboards.Whiteboards[whiteboardId];
                                                Assert.True(whiteboard.ParticipantStates[conn.User.Sub].CanUndo);
                            src/Services/ConferenceManagement/Strive.IntegrationTests/Services/WhiteboardTests.cs on lines 384..389

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

                            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

                            export const onReconnecting = createAction(`${DEFAULT_PREFIX}::ON_RECONNECTING`, (appData: any, error?: Error) => ({
                               payload: { appData, error },
                            }));
                            Severity: Major
                            Found in src/Web/WebSPA/Client/src/store/signal/actions.ts and 2 other locations - About 1 hr to fix
                            src/Web/WebSPA/Client/src/store/signal/actions.ts on lines 42..47
                            src/Web/WebSPA/Client/src/store/signal/actions.ts on lines 53..55

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

                            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

                            const useStyles = makeStyles((theme) => ({
                               errorChip: {
                                  backgroundColor: theme.palette.error.main,
                                  color: theme.palette.error.contrastText,
                               },
                            src/Web/WebSPA/Client/src/App.tsx on lines 19..24

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

                            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

                            const useStyles = makeStyles((theme) => ({
                               toast: {
                                  backgroundColor: theme.palette.background.paper,
                                  color: theme.palette.text.primary,
                               },
                            Severity: Major
                            Found in src/Web/WebSPA/Client/src/App.tsx and 1 other location - About 1 hr to fix
                            src/Web/WebSPA/Client/src/features/conference/components/appbar/WebRtcStatusChip.tsx on lines 6..11

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

                            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

                            export const onReconnected = createAction(`${DEFAULT_PREFIX}::ON_RECONNECTED`, (appData: any, error?: Error) => ({
                               payload: { appData, error },
                            }));
                            Severity: Major
                            Found in src/Web/WebSPA/Client/src/store/signal/actions.ts and 2 other locations - About 1 hr to fix
                            src/Web/WebSPA/Client/src/store/signal/actions.ts on lines 42..47
                            src/Web/WebSPA/Client/src/store/signal/actions.ts on lines 49..51

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

                            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

                            export const onConnectionClosed = createAction(
                               `${DEFAULT_PREFIX}::ON_CONNECTION_CLOSED`,
                               (appData?: any, error?: Error) => ({
                                  payload: { appData, error },
                               }),
                            Severity: Major
                            Found in src/Web/WebSPA/Client/src/store/signal/actions.ts and 2 other locations - About 1 hr to fix
                            src/Web/WebSPA/Client/src/store/signal/actions.ts on lines 49..51
                            src/Web/WebSPA/Client/src/store/signal/actions.ts on lines 53..55

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

                            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