Anapher/Strive

View on GitHub

Showing 735 of 735 total issues

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

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

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

Function ScreenSettings has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

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

    Function ConferenceSidebar has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function ConferenceSidebar() {
       const classes = useStyles();
    
       const dispatch = useDispatch();
       const open = useSelector((state: RootState) => state.conference.sidebarOpen);

      Function AvailableEquipmentTable has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function AvailableEquipmentTable() {
         const { t } = useTranslation();
         const devices = useSelector((state: RootState) => state.settings.availableDevices);
      
         return (

        Function ActionIcon has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function ActionIcon(source: ProducerSource, action: EquipmentCommandAction) {
           switch (source) {
              case 'mic':
              case 'loopback-mic':
                 switch (action) {

          Function register has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

             register(
                elem: HTMLAudioElement,
                participantId: string,
                track: MediaStreamTrack,
                onSpeaking: () => void,
          Severity: Minor
          Found in src/Web/WebSPA/Client/src/features/media/AudioManager.ts - About 1 hr to fix

            Method OnResultExecuting has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public override void OnResultExecuting(ResultExecutingContext context)
                    {
                        var result = context.Result;
                        if (result is ViewResult)
                        {

              Method LevenshteinDistance has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public static int LevenshteinDistance(string s, string t)
                      {
                          var n = s.Length;
                          var m = t.Length;
                          int[,] d = new int[n + 1, m + 1];

                Method ConfigureServices has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        public void ConfigureServices(IServiceCollection services)
                        {
                            var identityConfig = Configuration.GetSection("IdentityServer");
                            var spaHost = identityConfig["SpaClientHost"];
                            var issuerUri = identityConfig["Issuer"];
                Severity: Minor
                Found in src/Services/Identity/Identity.API/Startup.cs - About 1 hr to fix

                  Method GetNextYear has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private static int? GetNextYear(string yearExp, int year)
                          {
                              if (yearExp == "*")
                                  return year;
                  
                  

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

                                await conn.SyncObjects.AssertSyncObject<SynchronizedScene>(
                                    SynchronizedScene.SyncObjId(RoomOptions.DEFAULT_ROOM_ID), syncObj =>
                                    {
                                        Assert.Equal(syncObj.SceneStack, new IScene[]
                                        {
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 258..266
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 289..297
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 331..339
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 403..411

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

                                await conn.SyncObjects.AssertSyncObject<SynchronizedScene>(
                                    SynchronizedScene.SyncObjId(RoomOptions.DEFAULT_ROOM_ID), syncObj =>
                                    {
                                        Assert.Equal(syncObj.SceneStack, new IScene[]
                                        {
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 258..266
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 331..339
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 361..369
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 403..411

                    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

                            [Fact]
                            public async Task FetchPermissionsForParticipant_NotPresenter_ReturnEmpty()
                            {
                                // arrange
                                var provider = new PresenterSceneProvider(_mediator.Object);
                    src/Services/ConferenceManagement/Strive.Core.Tests/Services/Scenes/Providers/PresenterSceneProviderTests.cs on lines 150..162

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

                                await conn.SyncObjects.AssertSyncObject<SynchronizedScene>(
                                    SynchronizedScene.SyncObjId(RoomOptions.DEFAULT_ROOM_ID), syncObj =>
                                    {
                                        Assert.Equal(syncObj.SceneStack, new IScene[]
                                        {
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 258..266
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 289..297
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 361..369
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 403..411

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

                                await conn.SyncObjects.AssertSyncObject<SynchronizedScene>(
                                    SynchronizedScene.SyncObjId(RoomOptions.DEFAULT_ROOM_ID), syncObj =>
                                    {
                                        Assert.Equal(syncObj.SceneStack, new IScene[]
                                        {
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 258..266
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 289..297
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 331..339
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 361..369

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

                                await conn.SyncObjects.AssertSyncObject<SynchronizedScene>(
                                    SynchronizedScene.SyncObjId(RoomOptions.DEFAULT_ROOM_ID), syncObj =>
                                    {
                                        Assert.Equal(syncObj.SceneStack, new IScene[]
                                        {
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 289..297
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 331..339
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 361..369
                    src/Services/ConferenceManagement/Strive.IntegrationTests/Services/SceneTests.cs on lines 403..411

                    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

                            [Fact]
                            public async Task FetchPermissionsForParticipant_IsPresenter_ReturnLayer()
                            {
                                // arrange
                                var provider = new PresenterSceneProvider(_mediator.Object);
                    src/Services/ConferenceManagement/Strive.Core.Tests/Services/Scenes/Providers/PresenterSceneProviderTests.cs on lines 136..148

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

                       notifyConsumerClosed(connectionId: string, args: ConsumerArgs): Promise<void> {
                          return this.notifyConnection({ connectionId, methodName: 'consumerClosed', payload: args });
                       }
                    Severity: Major
                    Found in src/Services/SFU/src/lib/synchronization/rabbit-pub.ts and 7 other locations - About 1 hr to fix
                    src/Services/SFU/src/lib/synchronization/rabbit-pub.ts on lines 20..22
                    src/Services/SFU/src/lib/synchronization/rabbit-pub.ts on lines 24..26
                    src/Services/SFU/src/lib/synchronization/rabbit-pub.ts on lines 28..30
                    src/Services/SFU/src/lib/synchronization/rabbit-pub.ts on lines 32..34
                    src/Services/SFU/src/lib/synchronization/rabbit-pub.ts on lines 36..38
                    src/Services/SFU/src/lib/synchronization/rabbit-pub.ts on lines 40..42
                    src/Services/SFU/src/lib/synchronization/rabbit-pub.ts on lines 44..46

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

                    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

                                   <PollStatusIconProps
                                      Icon={poll.config.isAnonymous ? Incognito : IncognitoOff}
                                      description={
                                         poll.config.isAnonymous
                                            ? t('conference.poll.desc_anonymous')
                    src/Web/WebSPA/Client/src/features/poll/components/PollCard.tsx on lines 154..161

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

                    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

                                   <PollStatusIconProps
                                      Icon={poll.config.isAnswerFinal ? PencilOff : Pencil}
                                      description={
                                         poll.config.isAnswerFinal
                                            ? t('conference.poll.desc_answer_change_not')
                    src/Web/WebSPA/Client/src/features/poll/components/PollCard.tsx on lines 146..153

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

                    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