Anapher/Strive

View on GitHub

Showing 735 of 735 total issues

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

   configureCanvas(canvas: Canvas) {
      super.configureCanvas(canvas);

      canvas.isDrawingMode = false;
      canvas.selection = false;
src/Web/WebSPA/Client/src/features/whiteboard/tools/NoTool.ts on lines 5..17
src/Web/WebSPA/Client/src/features/whiteboard/tools/TextTool.ts on lines 10..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 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

   configureCanvas(canvas: Canvas) {
      super.configureCanvas(canvas);

      canvas.isDrawingMode = false;
      canvas.selection = false;
src/Web/WebSPA/Client/src/features/whiteboard/tools/NoTool.ts on lines 5..17
src/Web/WebSPA/Client/src/features/whiteboard/tools/PanTool.ts on lines 10..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 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 2 locations. Consider refactoring.
Open

export default function NotAuthenticated() {
   const { t } = useTranslation();

   return (
      <BaseAuthComponent componentName="NotAuthenticated">
src/Web/WebSPA/Client/src/features/auth/components/SessionLostComponent.tsx on lines 6..18

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

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

   private onConsumerResumed({ consumerId }: ConsumerInfoPayload) {
      const consumer = this.consumerManager.getConsumer(consumerId);
      if (consumer) {
         consumer.resume();
         this.consumerManager.resumedConsumer(consumer.id);
Severity: Major
Found in src/Web/WebSPA/Client/src/store/webrtc/WebRtcConnection.ts and 1 other location - About 3 hrs to fix
src/Web/WebSPA/Client/src/store/webrtc/WebRtcConnection.ts on lines 174..184

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

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

export default function SessionLostComponent() {
   const { t } = useTranslation();

   return (
      <BaseAuthComponent componentName="SessionLostComponent">
src/Web/WebSPA/Client/src/features/auth/components/NotAuthenticated.tsx on lines 6..18

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

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

   private onConsumerPaused({ consumerId }: ConsumerInfoPayload) {
      const consumer = this.consumerManager.getConsumer(consumerId);
      if (consumer) {
         consumer.pause();
         this.consumerManager.pausedConsumer(consumer.id);
Severity: Major
Found in src/Web/WebSPA/Client/src/store/webrtc/WebRtcConnection.ts and 1 other location - About 3 hrs to fix
src/Web/WebSPA/Client/src/store/webrtc/WebRtcConnection.ts on lines 186..196

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

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

WhiteboardController has 26 functions (exceeds 20 allowed). Consider refactoring.
Open

export default class WhiteboardController {
   private fc: fabric.Canvas;
   private tool: WhiteboardTool;
   private options: WhiteboardToolOptions;
   private unsubscribeTool: (() => void) | undefined;

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

             <DialogActions>
                <Button color="primary" onClick={onClose}>
                   {t('common:cancel')}
                </Button>
                <Button color="primary" disabled={!formState.isValid} type="submit" form="breakout-room-dialog-form">
    src/Web/WebSPA/Client/src/features/breakout-rooms/components/CreateBreakoutRoomsDialog.tsx on lines 68..75

    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

             <DialogActions>
                <Button color="primary" onClick={onClose}>
                   {t('common:cancel')}
                </Button>
                <Button color="primary" disabled={!formState.isValid} type="submit" form="breakout-room-dialog-form">
    src/Web/WebSPA/Client/src/features/breakout-rooms/components/UpdateBreakoutRoomsDialog.tsx on lines 73..80

    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

    export default function TalkingStickRace({ className, next, dimensions }: RenderSceneProps) {
       const overwritten = next();
       if (overwritten) return <TalkingStickFrame className={className}>{overwritten}</TalkingStickFrame>;
    
       return <NoPresenter className={className} dimensions={dimensions} />;
    src/Web/WebSPA/Client/src/features/scenes/components/talkingStick/TalkingStickQueue.tsx on lines 13..18

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

    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

    export default function TalkingStickQueue({ className, next, dimensions }: RenderSceneProps) {
       const overwritten = next();
       if (overwritten) return <TalkingStickFrame className={className}>{overwritten}</TalkingStickFrame>;
    
       return <QueueNoPresenter className={className} dimensions={dimensions} />;
    src/Web/WebSPA/Client/src/features/scenes/components/talkingStick/TalkingStickRace.tsx on lines 13..18

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

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

       private async createConsumer(connection: Connection, { producer, participantId }: ProducerInfo): Promise<void> {
          logger.debug(
             'createConsumer() from %s to %s (producer id: %s)',
             participantId,
             connection.participantId,
    Severity: Major
    Found in src/Services/SFU/src/lib/media-soup/mediasoup-mixer.ts - About 2 hrs to fix

      File conference.ts has 285 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import _ from 'lodash';
      import { Router } from 'mediasoup/lib/Router';
      import { Consumer, MediaKind, Producer, RtpCapabilities, WebRtcTransportOptions } from 'mediasoup/lib/types';
      import { SuccessOrError } from '../../common-types';
      import * as errors from '../../errors';
      Severity: Minor
      Found in src/Services/SFU/src/lib/conference/conference.ts - About 2 hrs to fix

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

                 {canSendAnnouncement && (
                    <Tooltip title={t<string>('conference.chat.options.send_announcement')}>
                       <IconButton
                          id="chat-send-announcement"
                          aria-label={t<string>('conference.chat.options.send_announcement')}
        src/Web/WebSPA/Client/src/features/chat/components/SendMessageOptions.tsx on lines 63..74

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

        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

                 {canSendAnonymousMessage && !isPrivateChat && (
                    <Tooltip title={t<string>('conference.chat.options.send_anonymously')}>
                       <IconButton
                          id="chat-send-anonymously"
                          aria-label={t<string>('conference.chat.options.send_anonymously')}
        src/Web/WebSPA/Client/src/features/chat/components/SendMessageOptions.tsx on lines 75..86

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

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

        export default function BreakoutRoomsPopper(props: ListItemPopperProps) {
           const dispatch = useDispatch();
           const { t } = useTranslation();
           const classes = useStyles();
        
        

          Function EquipmentSettings has 67 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function EquipmentSettings() {
             const dispatch = useDispatch();
             const { t } = useTranslation();
             const classes = useStyles();
          
          

            File WebRtcConnection.ts has 278 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import { HubConnection } from '@microsoft/signalr';
            import debug from 'debug';
            import { Device } from 'mediasoup-client';
            import { MediaKind, RtpParameters, Transport } from 'mediasoup-client/lib/types';
            import { HubSubscription, subscribeEvent, unsubscribeAll } from 'src/utils/signalr-utils';
            Severity: Minor
            Found in src/Web/WebSPA/Client/src/store/webrtc/WebRtcConnection.ts - About 2 hrs to fix

              File InMemoryDatabaseActions.cs has 278 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              using System;
              using System.Collections.Generic;
              using System.Collections.Immutable;
              using System.Linq;
              using System.Threading.Tasks;

                Class InMemoryDatabaseTransaction has 24 methods (exceeds 20 allowed). Consider refactoring.
                Open

                    public class InMemoryDatabaseTransaction : InMemoryDatabaseActions, IKeyValueDatabaseTransaction
                    {
                        private readonly InMemoryKeyValueData _data;
                        private readonly List<Func<ValueTask>> _transactionSteps = new();
                        private readonly CancellationTokenSource _cancellationTokenSource = new();
                  Severity
                  Category
                  Status
                  Source
                  Language