Anapher/Strive

View on GitHub

Showing 735 of 735 total issues

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

         <DeviceSelector
            devices={audioDevices}
            label={t('common:microphone')}
            defaultName={t('common:microphone')}
            selectedDevice={audioDevice}
src/Web/WebSPA/Client/src/features/settings/components/ScreenSettings.tsx on lines 42..48
src/Web/WebSPA/Client/src/features/settings/components/WebcamSettings.tsx on lines 37..43

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

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

export default function useConsumer(
   participantId: string | undefined,
   kind: ProducerSource,
): Consumer | null | undefined {
   const [consumer, setConsumer] = useState<Consumer | null | undefined>(undefined);
Severity: Minor
Found in src/Web/WebSPA/Client/src/store/webrtc/hooks/useConsumer.ts - About 1 hr to fix

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

            [Fact]
            public async Task ConferenceMustBeOpen_IsOpen_Succeed()
            {
                // arrange
                var repo = new Mock<IOpenConferenceRepository>();
    src/Services/ConferenceManagement/Strive.Tests/Hubs/Core/Services/Middlewares/ServiceInvokerConferenceMiddlewareTests.cs on lines 18..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 141.

    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 ConferenceMustBeOpen_NotOpen_Failed()
            {
                // arrange
                var repo = new Mock<IOpenConferenceRepository>();
    src/Services/ConferenceManagement/Strive.Tests/Hubs/Core/Services/Middlewares/ServiceInvokerConferenceMiddlewareTests.cs on lines 34..48

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

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

    export default function About() {
       const { t } = useTranslation();
       const classes = useStyles();
    
       return (
    Severity: Minor
    Found in src/Web/WebSPA/Client/src/features/settings/components/About.tsx - About 1 hr to fix

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

              [Fact]
              public async Task Func_ChangeParameter_ShouldEvaluateFunctionAgain()
              {
                  var counter = 0;
      
      
      src/Services/ConferenceManagement/Strive.Core.Tests/Utilities/MemorizedTests.cs on lines 28..45

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

      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 Func_ExecuteThreeTimesSameParameter_ShouldInvokeCallbackOnceAndReturnEqualResult()
              {
                  var counter = 0;
      
      
      src/Services/ConferenceManagement/Strive.Core.Tests/Utilities/MemorizedTests.cs on lines 47..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 140.

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

      export default function AudioSettingsTest() {
         const classes = useStyles();
         const { t } = useTranslation();
      
         const myId = useMyParticipantId();

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

                                <Grid item xs={12} sm={6}>
                                   <AdvancedOption
                                      control={control}
                                      label={t('conference.poll.create_dialog.advanced.anonymous_label')}
                                      helperText={t('conference.poll.create_dialog.advanced.anonymous_helper')}
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 233..240
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 241..248
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 249..256
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 257..264

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

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

                                <Grid item xs={12} sm={6}>
                                   <AdvancedOption
                                      control={control}
                                      label={t('conference.poll.create_dialog.advanced.publish_results_label')}
                                      helperText={t('conference.poll.create_dialog.advanced.publish_results_helper')}
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 225..232
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 233..240
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 241..248
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 257..264

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

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

                                <Grid item xs={12} sm={6}>
                                   <AdvancedOption
                                      control={control}
                                      label={t('conference.poll.create_dialog.advanced.open_label')}
                                      helperText={t('conference.poll.create_dialog.advanced.open_helper')}
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 225..232
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 233..240
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 249..256
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 257..264

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

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

                                <Grid item xs={12} sm={6}>
                                   <AdvancedOption
                                      control={control}
                                      label={t('conference.poll.create_dialog.advanced.global_label')}
                                      helperText={t('conference.poll.create_dialog.advanced.global_helper')}
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 225..232
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 233..240
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 241..248
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 249..256

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

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

                                <Grid item xs={12} sm={6}>
                                   <AdvancedOption
                                      control={control}
                                      label={t('conference.poll.create_dialog.advanced.anwser_final_label')}
                                      helperText={t('conference.poll.create_dialog.advanced.anwser_final_helper')}
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 225..232
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 241..248
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 249..256
        src/Web/WebSPA/Client/src/features/poll/components/OpenPollDialogForm.tsx on lines 257..264

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

        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

                 {canSendPrivateMessage && (
                    <MenuItem onClick={handleSendPrivateMessage}>
                       <ListItemIcon className={classes.menuIcon}>
                          <SendIcon fontSize="small" />
                       </ListItemIcon>
        src/Web/WebSPA/Client/src/features/conference/components/ParticipantContextMenu.tsx on lines 187..194
        src/Web/WebSPA/Client/src/features/conference/components/ParticipantContextMenu.tsx on lines 195..202

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

        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

                 {canKick && (
                    <MenuItem onClick={handleKickParticipant}>
                       <ListItemIcon className={classes.menuIcon}>
                          <AccountRemove fontSize="small" />
                       </ListItemIcon>
        src/Web/WebSPA/Client/src/features/conference/components/ParticipantContextMenu.tsx on lines 179..186
        src/Web/WebSPA/Client/src/features/conference/components/ParticipantContextMenu.tsx on lines 195..202

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

        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

                 {canChangeParticipantProducers && (
                    <MenuItem onClick={handleMuteParticipant}>
                       <ListItemIcon className={classes.menuIcon}>
                          <MicOffRounded fontSize="small" />
                       </ListItemIcon>
        src/Web/WebSPA/Client/src/features/conference/components/ParticipantContextMenu.tsx on lines 179..186
        src/Web/WebSPA/Client/src/features/conference/components/ParticipantContextMenu.tsx on lines 187..194

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

        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 async createTransport(request: CreateTransportRequest): Promise<SuccessOrError<CreateTransportResponse>> {
              const response = await axios.post('/create-transport', request, this.getConfig());
              return SfuClient.wrapResponse(response);
           }
        Severity: Major
        Found in src/Web/WebSPA/Client/src/store/webrtc/sfu-client.ts and 1 other location - About 1 hr to fix
        src/Web/WebSPA/Client/src/store/webrtc/sfu-client.ts on lines 39..42

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

        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 async transportProduce(request: TransportProduceRequest): Promise<SuccessOrError<TransportProduceResponse>> {
              const response = await axios.post('/transport-produce', request, this.getConfig());
              return SfuClient.wrapResponse(response);
           }
        Severity: Major
        Found in src/Web/WebSPA/Client/src/store/webrtc/sfu-client.ts and 1 other location - About 1 hr to fix
        src/Web/WebSPA/Client/src/store/webrtc/sfu-client.ts on lines 29..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 70.

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

           onMouseDown(event: IEvent): void {
              if (event.target) return;
        
              const canvas = this.getCanvas();
              if (canvas.getActiveObject()) return;
        Severity: Minor
        Found in src/Web/WebSPA/Client/src/features/whiteboard/tools/TextTool.ts - About 1 hr to fix

          Function Settings has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function Settings() {
             const classes = useStyles();
             const [value, setValue] = React.useState(0);
             const { t } = useTranslation();
          
          
          Severity: Minor
          Found in src/Web/WebSPA/Client/src/features/settings/components/Settings.tsx - About 1 hr to fix
            Severity
            Category
            Status
            Source
            Language