Anapher/Strive

View on GitHub

Showing 735 of 735 total issues

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

using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Moq;
src/Services/ConferenceManagement/Strive.Core.Tests/Services/Scenes/UseCases/SetSceneUseCaseTests.cs on lines 1..73

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

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

using System.Collections.Immutable;
using System.Threading;
using System.Threading.Tasks;
using MediatR;
using Moq;
src/Services/ConferenceManagement/Strive.Core.Tests/Services/Scenes/UseCases/SetOverwrittenContentSceneUseCase.cs on lines 1..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 537.

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

File CoreHub.cs has 473 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Autofac;
Severity: Minor
Found in src/Services/ConferenceManagement/Strive/Hubs/Core/CoreHub.cs - About 7 hrs to fix

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

    function QueueNoPresenter({ className, dimensions }: QueueNoPresenterProps) {
       const { t } = useTranslation();
       const dispatch = useDispatch();
       const canEnqueue = usePermission(SCENES_CAN_QUEUE_FOR_TALKING_STICK);
    
    
    src/Web/WebSPA/Client/src/features/scenes/components/talkingStick/TalkingStickRace.tsx on lines 25..39

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

    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

    function NoPresenter({ className, dimensions }: NoPresenterProps) {
       const { t } = useTranslation();
       const dispatch = useDispatch();
       const canEnqueue = usePermission(SCENES_CAN_TAKE_TALKING_STICK);
    
    
    src/Web/WebSPA/Client/src/features/scenes/components/talkingStick/TalkingStickQueue.tsx on lines 25..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 181.

    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

             <Grid item xs={12} md={6}>
                <div className={classes.selectFormControl}>
                   <FormControl fullWidth>
                      <InputLabel id="scene-layout-select-label">
                         {t('dialog_create_conference.tabs.common.scene_layout')}
    src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 290..310

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

    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

       app.post('/:conferenceId/connect-transport', conferenceMatchMiddleware, async (req, res) => {
          const { conferenceId, connectionId } = getJwtProps(req);
    
          const conference = await conferenceManager.getConference(conferenceId);
          if (!conference) {
    Severity: Major
    Found in src/Services/SFU/src/controllers.ts and 2 other locations - About 6 hrs to fix
    src/Services/SFU/src/controllers.ts on lines 124..140
    src/Services/SFU/src/controllers.ts on lines 142..158

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

    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

       app.post('/:conferenceId/set-preffered-layers', conferenceMatchMiddleware, async (req, res) => {
          const { conferenceId, connectionId } = getJwtProps(req);
    
          const conference = await conferenceManager.getConference(conferenceId);
          if (!conference) {
    Severity: Major
    Found in src/Services/SFU/src/controllers.ts and 2 other locations - About 6 hrs to fix
    src/Services/SFU/src/controllers.ts on lines 88..104
    src/Services/SFU/src/controllers.ts on lines 124..140

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

    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

             <Grid item xs={12} md={6}>
                <div className={classes.selectFormControl}>
                   <FormControl fullWidth>
                      <InputLabel id="scene-layout-screenshare-select-label">
                         {t('dialog_create_conference.tabs.common.scene_layout_screen_share')}
    src/Web/WebSPA/Client/src/features/create-conference/components/TabCommon.tsx on lines 269..289

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

    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

       app.post('/:conferenceId/change-stream', conferenceMatchMiddleware, async (req, res) => {
          const { conferenceId, connectionId } = getJwtProps(req);
    
          const conference = await conferenceManager.getConference(conferenceId);
          if (!conference) {
    Severity: Major
    Found in src/Services/SFU/src/controllers.ts and 2 other locations - About 6 hrs to fix
    src/Services/SFU/src/controllers.ts on lines 88..104
    src/Services/SFU/src/controllers.ts on lines 142..158

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

    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

       app.post('/:conferenceId/create-transport', conferenceMatchMiddleware, async (req, res) => {
          const { conferenceId, connectionId } = getJwtProps(req);
    
          const conference = await conferenceManager.getConference(conferenceId);
          if (!conference) {
    Severity: Major
    Found in src/Services/SFU/src/controllers.ts and 1 other location - About 6 hrs to fix
    src/Services/SFU/src/controllers.ts on lines 106..122

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

    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

       app.post('/:conferenceId/transport-produce', conferenceMatchMiddleware, async (req, res) => {
          const { conferenceId, connectionId } = getJwtProps(req);
    
          const conference = await conferenceManager.getConference(conferenceId);
          if (!conference) {
    Severity: Major
    Found in src/Services/SFU/src/controllers.ts and 1 other location - About 6 hrs to fix
    src/Services/SFU/src/controllers.ts on lines 70..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 170.

    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

    Class CoreHub has 46 methods (exceeds 20 allowed). Consider refactoring.
    Open

        [Authorize]
        public class CoreHub : ScopedHub, ISfuConnectionHub
        {
            private readonly ICoreHubConnections _connections;
            private readonly ILogger<CoreHub> _logger;
    Severity: Minor
    Found in src/Services/ConferenceManagement/Strive/Hubs/Core/CoreHub.cs - About 6 hrs to fix

      File InMemoryKeyValueDatabaseTests.cs has 421 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      using System.Collections.Generic;
      using System.Linq;
      using System.Threading.Tasks;
      using Microsoft.Extensions.Options;
      using Strive.Infrastructure.KeyValue;

        Function SceneManagement has 142 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

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

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

          test('[SynchronizedByExactId] applyPatch() patches the object in state', () => {
             const obj = synchronizedPropertyFactory({ type: 'exactId', syncObjId: 'test', propertyName: 'testProp' });
             const patch: Operation[] = [{ op: 'add', path: '/isOpen', value: true }];
          
             const state = { testProp: { isOpen: false } } as any;
          src/Web/WebSPA/Client/src/store/signal/synchronization/synchronized-property.test.ts on lines 48..56

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

          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

          test('[SynchronizedSingle] applyPatch() patches the object in state', () => {
             const obj = synchronizedPropertyFactory({ type: 'single', baseId: 'test', propertyName: 'testProp' });
             const patch: Operation[] = [{ op: 'add', path: '/isOpen', value: true }];
          
             const state = { testProp: { isOpen: false } } as any;
          src/Web/WebSPA/Client/src/store/signal/synchronization/synchronized-property.test.ts on lines 21..29

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

          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

          Class InMemoryKeyValueDatabaseTests has 40 methods (exceeds 20 allowed). Consider refactoring.
          Open

              public class InMemoryKeyValueDatabaseTests
              {
                  private readonly InMemoryKeyValueData _data = new();
                  private readonly InMemoryKeyValueDatabase _database;
          
          

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

                    protected override void ConfigureContainer(ContainerBuilder builder)
                    {
                        base.ConfigureContainer(builder);
            
                        builder.RegisterType<TalkingStickModeHandler>().AsImplementedInterfaces().InstancePerDependency();
            src/Services/ConferenceManagement/Strive.Core.IntegrationTests/Services/SceneTalkingStickTests.cs on lines 43..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 344.

            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

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

                    protected override void ConfigureContainer(ContainerBuilder builder)
                    {
                        base.ConfigureContainer(builder);
            
                        builder.RegisterType<TalkingStickModeHandler>().AsImplementedInterfaces().InstancePerDependency();
            src/Services/ConferenceManagement/Strive.Core.IntegrationTests/Services/SceneTests.cs on lines 48..71

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

            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