Anapher/Strive

View on GitHub

Showing 735 of 735 total issues

Method CloseConference_PollsOpen_DeleteAllPolls has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        [Fact]
        public async Task CloseConference_PollsOpen_DeleteAllPolls()
        {
            // arrange
            var (connection, _) = await ConnectToOpenedConference();

    Method EnforceGlobalLimit has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            private void EnforceGlobalLimit(Dictionary<string, ParticipantWhiteboardState> states)
            {
                var totalHistory = states.Sum(x => x.Value.RedoList.Count + x.Value.UndoList.Count);
                if (totalHistory > _options.MaxUndoHistory)
                {

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

              {
                  var participant = GetContextParticipant();
                  var roomId = await GetParticipantRoomId(participant);
                  if (roomId == null)
                      return ConferenceError.RoomNotFound;
      src/Services/ConferenceManagement/Strive/Hubs/Core/CoreHub.cs on lines 568..576

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

      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 participant = GetContextParticipant();
                  var roomId = await GetParticipantRoomId(participant);
                  if (roomId == null) return ConferenceError.RoomNotFound;
      
      
      src/Services/ConferenceManagement/Strive/Hubs/Core/CoreHub.cs on lines 370..379

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

      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

              {
                  try
                  {
                      var (participant, _) = GetContextParticipantWithToken();
      
      
      src/Services/ConferenceManagement/Strive/Hubs/Equipment/EquipmentHub.cs on lines 121..134

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

      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

              {
                  try
                  {
                      var (participant, _) = GetContextParticipantWithToken();
      
      
      src/Services/ConferenceManagement/Strive/Hubs/Equipment/EquipmentHub.cs on lines 105..118

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

      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

                  {
                      PermissionType.BreakoutRoom,
                      new[]
                      {
                          DefinedPermissions.Media.CanShareAudio.Configure(true),
      src/Services/ConferenceManagement/Strive.Core/Services/Permissions/Options/DefaultPermissionOptions.cs on lines 17..27

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

      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

                  {
                      PermissionType.Conference,
                      new[]
                      {
                          DefinedPermissions.Chat.CanSendChatMessage.Configure(true),
      src/Services/ConferenceManagement/Strive.Core/Services/Permissions/Options/DefaultPermissionOptions.cs on lines 54..64

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

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

      export default function CommandHistory() {
         const { t } = useTranslation();
         const history = useSelector((state: RootState) => state.equipment.commandHistory);
         const devices = useSelector(selectLocalDevices);
      
      

        Function unregisterConsumer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

           private unregisterConsumer(id: string): void {
              log('Unregister consumer %s', id);
        
              let currentUsage = this.consumerUsage.get(id);
              if (currentUsage === undefined) {
        Severity: Minor
        Found in src/Web/WebSPA/Client/src/store/webrtc/consumer-usage-control.ts - About 1 hr to fix

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

                  public async Task<Unit> Handle(UpdateParticipantsPermissionsRequest request,
                      CancellationToken cancellationToken)
                  {
                      var participants = request.Participants;
          
          

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

                    public async Task<Unit> Handle(UndoRequest request, CancellationToken cancellationToken)
                    {
                        var (conferenceId, roomId, whiteboardId, participantId) = request;
            
                        Whiteboard UpdateAction(Whiteboard whiteboard)

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

                      public async Task<Unit> Handle(RedoRequest request, CancellationToken cancellationToken)
                      {
                          var (conferenceId, roomId, whiteboardId, participantId) = request;
              
                          Whiteboard UpdateAction(Whiteboard whiteboard)

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

                const presenter: PollTypePresenter<NumericInstruction, NumericAnswer> = {
                   getPollDescription,
                
                   instructionType: 'numeric',
                   labelTranslationKey: 'conference.poll.types.numeric.label',
                src/Web/WebSPA/Client/src/features/poll/types/single-choice/index.ts on lines 11..22
                src/Web/WebSPA/Client/src/features/poll/types/tag-cloud/index.ts on lines 13..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 58.

                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

                const presenter: PollTypePresenter<TagCloudInstruction, TagCloudAnswer> = {
                   getPollDescription,
                
                   instructionType: 'tagCloud',
                   labelTranslationKey: 'conference.poll.types.tag_cloud.label',
                src/Web/WebSPA/Client/src/features/poll/types/numeric/index.ts on lines 30..41
                src/Web/WebSPA/Client/src/features/poll/types/single-choice/index.ts on lines 11..22

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

                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

                   delete(fc: fabric.Canvas, currentCanvas: WhiteboardCanvas): void {
                      fc.absolutePan(new fabric.Point(currentCanvas.panX, currentCanvas.panY));
                   }
                src/Web/WebSPA/Client/src/features/whiteboard/live-update-handler.ts on lines 64..66

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

                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

                   apply(fc: fabric.Canvas, action: PanningCanvasLiveAction): void {
                      fc.absolutePan(new fabric.Point(action.panX, action.panY));
                   }
                src/Web/WebSPA/Client/src/features/whiteboard/live-update-handler.ts on lines 68..70

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

                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

                const presenter: PollTypePresenter<SingleChoiceInstruction, SingleChoiceAnswer> = {
                   getPollDescription,
                
                   instructionType: 'singleChoice',
                   labelTranslationKey: 'conference.poll.types.single_choice.label',
                src/Web/WebSPA/Client/src/features/poll/types/numeric/index.ts on lines 30..41
                src/Web/WebSPA/Client/src/features/poll/types/tag-cloud/index.ts on lines 13..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 58.

                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

                        [Fact]
                        public async Task RemoveRooms_RoomsAreCreated_UpdateSynchronizedObject()
                        {
                            // arrange
                            var (connection, _) = await ConnectToOpenedConference();
                src/Services/ConferenceManagement/Strive.IntegrationTests/Services/RoomTests.cs on lines 75..82
                src/Services/ConferenceManagement/Strive.IntegrationTests/Services/RoomTests.cs on lines 121..128

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

                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

                        [Fact]
                        public async Task SwitchRoom_ConferenceOpened_UpdateSynchronizedObject()
                        {
                            // arrange
                            var (connection, _) = await ConnectToOpenedConference();
                src/Services/ConferenceManagement/Strive.IntegrationTests/Services/RoomTests.cs on lines 100..107
                src/Services/ConferenceManagement/Strive.IntegrationTests/Services/RoomTests.cs on lines 121..128

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

                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