Anapher/Strive

View on GitHub

Showing 735 of 735 total issues

Method WaitForEventInternal has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        private async Task WaitForEventInternal(Func<bool> testCondition, TimeSpan timeout)
        {
            var timeoutTimestamp = DateTimeOffset.UtcNow.Add(timeout);
            var autoResetEvent = new AsyncAutoResetEvent(false);

    Method RemoveParticipant has 34 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            private async Task RemoveParticipant(Participant participant, string? connectionId,
                CancellationToken cancellationToken)
            {
                _logger.LogDebug("RemoveParticipant() | {participant}, connectionId:{connectionId}", participant,
                    connectionId);

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

               <Box mt={4}>
                  <ErrorWrapper
                     failed={webrtcState !== 'connected'}
                     error={t('conference.settings.webrtc_not_connected_error')}
                  >
      src/Web/WebSPA/Client/src/features/settings/components/WebcamSettings.tsx on lines 44..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 62.

      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

               <Box mt={4}>
                  <ErrorWrapper
                     failed={webrtcState !== 'connected'}
                     error={t('conference.settings.webrtc_not_connected_error')}
                  >
      src/Web/WebSPA/Client/src/features/settings/components/AudioSettings.tsx on lines 74..81

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

      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

         if (health.connection.sendTransport.transportState !== 'connected') {
            return t(`${webRtcNamespace}.transport_${health.connection.sendTransport.transportState}.message`, {
               transport: 'send-transport',
            });
         }
      src/Web/WebSPA/Client/src/features/conference/components/troubleshoot/troubleshoot-connection/status-utils.ts on lines 27..31

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

      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

         if (health.connection.receiveTransport.transportState !== 'connected') {
            return t(`${webRtcNamespace}.transport_${health.connection.receiveTransport.transportState}.message`, {
               transport: 'receive-transport',
            });
         }
      src/Web/WebSPA/Client/src/features/conference/components/troubleshoot/troubleshoot-connection/status-utils.ts on lines 32..36

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

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

      export default function ChatBar() {
         const classes = useStyles();
         const participants = useSelector(selectParticipantList);
         const connected = useSelector((state: RootState) => state.signalr.isConnected);
         const channels = useSelector(selectChannels);
      Severity: Minor
      Found in src/Web/WebSPA/Client/src/features/chat/components/ChatBar.tsx - About 1 hr to fix

        Function getChannel has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

           public async getChannel(): Promise<RabbitChannel> {
              if (this.cachedChannel) return this.cachedChannel;
        
              try {
                 this.cachedChannel = await retry(
        Severity: Minor
        Found in src/Services/SFU/src/rabbitmq/rabbit-mq-conn.ts - About 1 hr to fix

          Function changeStream has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

             public async changeStream({ id, type, action }: ChangeStreamRequest, connectionId: string): Promise<SuccessOrError> {
                const connection = this.connections.get(connectionId);
                if (!connection) {
                   return { success: false, error: errors.connectionNotFound(connectionId) };
                }
          Severity: Minor
          Found in src/Services/SFU/src/lib/conference/conference.ts - About 1 hr to fix

            Function MainRoute has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Function MultipleChoiceInstructionForm has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function MultipleChoiceInstructionForm(props: InstructionFormProps) {
                 const { t } = useTranslation();
                 const {
                    form: {
                       register,

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

                        [Fact]
                        public void CreatePatch_ValueChanged_CallPatchValue()
                        {
                            // arrange
                            var original = JToken.FromObject(new TestObj {Value = 5});
                src/Libs/JsonPatchGenerator.Tests/Handlers/ObjectPatchTypeHandlerTests.cs on lines 53..65
                src/Libs/JsonPatchGenerator.Tests/Handlers/ObjectPatchTypeHandlerTests.cs on lines 81..93

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

                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 void CreatePatch_PropertyNull_CallPatchValueSetNull()
                        {
                            // arrange
                            var original = JToken.FromObject(new TestObj2 {Value = "hello"});
                src/Libs/JsonPatchGenerator.Tests/Handlers/ObjectPatchTypeHandlerTests.cs on lines 25..37
                src/Libs/JsonPatchGenerator.Tests/Handlers/ObjectPatchTypeHandlerTests.cs on lines 53..65

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

                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 void CreatePatch_PropertyWasNull_CallPatchValue()
                        {
                            // arrange
                            var original = JToken.FromObject(new TestObj2 {Value = null});
                src/Libs/JsonPatchGenerator.Tests/Handlers/ObjectPatchTypeHandlerTests.cs on lines 25..37
                src/Libs/JsonPatchGenerator.Tests/Handlers/ObjectPatchTypeHandlerTests.cs on lines 81..93

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

                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

                            {connection.receiveTransport.transportState === 'new' &&
                               connection.sendTransport.transportState === 'new' && (
                                  <Typography>{t(`${webRtcNamespace}.transport_new.desc`)}</Typography>
                               )}
                src/Web/WebSPA/Client/src/features/conference/components/troubleshoot/troubleshoot-connection/DetailedErrorStatus.tsx on lines 59..62

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

                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

                            {connection.receiveTransport.transportState === 'connecting' &&
                               connection.sendTransport.transportState === 'connecting' && (
                                  <Typography>{t(`${webRtcNamespace}.transport_connecting.desc`)}</Typography>
                               )}
                src/Web/WebSPA/Client/src/features/conference/components/troubleshoot/troubleshoot-connection/DetailedErrorStatus.tsx on lines 55..58

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

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

                   public async updateParticipant(participant: Participant): Promise<void> {
                      await this.lock.acquire(participant.participantId, async () => {
                         // loopback is independent from the room
                         await this.loopbackManager.updateParticipant(participant);
                
                
                Severity: Minor
                Found in src/Services/SFU/src/lib/rooms/room-manager.ts - About 1 hr to fix

                  Function useWebRtcConnectionHealth has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export function useWebRtcConnectionHealth(): SfuConnectionHealth | undefined {
                     const connection = useWebRtc();
                     const [health, setHealth] = useState<SfuConnectionHealth | undefined>();
                  
                     useEffect(() => {

                    Method Aggregate_CaseInsensitive_BuildCloud has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            [Fact]
                            public async Task Aggregate_CaseInsensitive_BuildCloud()
                            {
                                // arrange
                                var aggregator = new TagCloudAggregator();

                      Function synchronizeObjectState has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function synchronizeObjectState<TS = any>(
                         requests: SynchronizeProperty | SynchronizeProperty[],
                         syncObjDeletedCallback?: (state: TS, syncObjId: string) => void,
                      ) {
                         if (!Array.isArray(requests)) {
                      Severity: Minor
                      Found in src/Web/WebSPA/Client/src/store/signal/synchronized-object.ts - About 1 hr to fix
                        Severity
                        Category
                        Status
                        Source
                        Language