Anapher/Strive

View on GitHub

Showing 735 of 735 total issues

Function getStatusMessage has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const getStatusMessage: (health: WebRtcHealth, t: TFunction<'translation'>) => string = (health, t) => {
   if (health.connection?.status === 'ok' && health.connector.status === 'ok')
      return t(`${webRtcNamespace}.connected.message`);

   if (health.connector.status !== 'ok') {

    Function SceneLayoutSelect has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function SceneLayoutSelect(props: React.ComponentProps<typeof Select>) {
       const { t } = useTranslation();
    
       return (
          <>

      Method TalkingStick_Race_PresenterLeaves_RemoveScene has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              [Fact]
              public async Task TalkingStick_Race_PresenterLeaves_RemoveScene()
              {
                  // arrange
                  var (conn, conference) = await ConnectToOpenedConference();

        Method Handle has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public async Task<Unit> Handle(SetParticipantRoomRequest request, CancellationToken cancellationToken)
                {
                    var (conferenceId, assignments) = request;
        
                    var changedRooms = new Dictionary<Participant, ParticipantRoomChangeInfo>();

          Method BuildLoggedOutViewModelAsync has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private async Task<LoggedOutViewModel> BuildLoggedOutViewModelAsync(string logoutId)
                  {
                      // get context information (client name, post logout redirect URI and iframe for federated signout)
                      var logout = await _interaction.GetLogoutContextAsync(logoutId);
          
          

            Method Main has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public static int Main(string[] args)
                    {
                        Log.Logger = new LoggerConfiguration()
                            .MinimumLevel.Debug()
                            .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
            Severity: Minor
            Found in src/Services/Identity/Identity.API/Program.cs - About 1 hr to fix

              Method RemoveParticipantTypingAfter_AddMultiple_SendAllRequests has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      [Fact]
                      public async Task RemoveParticipantTypingAfter_AddMultiple_SendAllRequests()
                      {
                          // arrange
                          var timer = Create();

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

                        public static void SetupConference(this Mock<IMediator> mediator, Conference conference)
                        {
                            mediator.Setup(x =>
                                x.Send(It.Is<FindConferenceByIdRequest>(request => request.ConferenceId == conference.ConferenceId),
                                    It.IsAny<CancellationToken>())).ReturnsAsync(conference);
                src/Services/ConferenceManagement/Strive.Core.Tests/_TestHelpers/ConferenceManagementHelper.cs on lines 12..16

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

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

                        [Fact]
                        public void Validate_Fuzzy_ValidAnswers_ReturnNull()
                        {
                            // arrange
                            var answer = new TagCloudAnswer(new[] {"visual basic", "c#"});
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.cs on lines 39..51
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.cs on lines 53..65
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.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 92.

                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

                        private void SetupIsParticipantJoined(Participant participant, bool joined)
                        {
                            _mediator.Setup(x =>
                                x.Send(It.Is<CheckIsParticipantJoinedRequest>(request => request.Participant.Equals(participant)),
                                    It.IsAny<CancellationToken>())).ReturnsAsync(joined);
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Equipment/UseCases/AuthenticateEquipmentUseCaseTests.cs on lines 27..32

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 92.

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

                        [Fact]
                        public void Validate_CaseInsensitive_ValidAnswers_ReturnNull()
                        {
                            // arrange
                            var answer = new TagCloudAnswer(new[] {"visual basic", "c#"});
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.cs on lines 39..51
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.cs on lines 53..65
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.cs on lines 67..79

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

                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

                        private void SetupIsParticipantJoined(Participant participant, bool joined)
                        {
                            _mediator.Setup(x =>
                                x.Send(It.Is<CheckIsParticipantJoinedRequest>(request => request.Participant.Equals(participant)),
                                    It.IsAny<CancellationToken>())).ReturnsAsync(joined);
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Equipment/UseCases/InitializeEquipmentUseCaseTests.cs on lines 31..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 92.

                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

                            await connection.SyncObjects.AssertSyncObject<SynchronizedRooms>(SyncObjId, value =>
                            {
                                var mapping = Assert.Single(value.Participants);
                                Assert.Equal(connection.User.Sub, mapping.Key);
                                Assert.Equal(RoomOptions.DEFAULT_ROOM_ID, mapping.Value);
                src/Services/ConferenceManagement/Strive.IntegrationTests/Services/RoomTests.cs on lines 92..97

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

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

                        [Fact]
                        public void Validate_CaseInsensitive_DuplicateAnswers_ReturnError()
                        {
                            // arrange
                            var answer = new TagCloudAnswer(new[] {"visual basic", "Visual Basic"});
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.cs on lines 53..65
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.cs on lines 67..79
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.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 92.

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

                        [Fact]
                        public void Validate_Fuzzy_DuplicateAnswers_ReturnError()
                        {
                            // arrange
                            var answer = new TagCloudAnswer(new[] {"visual basic", "visualbasic"});
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.cs on lines 39..51
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.cs on lines 67..79
                src/Services/ConferenceManagement/Strive.Core.Tests/Services/Poll/Types/TagCloud/TagCloudAnswerValidatorTests.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 92.

                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

                        protected override async ValueTask<SynchronizedEquipment> InternalFetchValue(string conferenceId,
                            SynchronizedObjectId synchronizedObjectId)
                        {
                            var participantId = synchronizedObjectId.Parameters[SynchronizedEquipment.PROP_PARTICIPANT_ID];
                            var joinedParticipant = new Participant(conferenceId, participantId);
                src/Services/ConferenceManagement/Strive.Core/Services/Permissions/SynchronizedParticipantPermissionsProvider.cs on lines 21..30

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

                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

                            await connection.SyncObjects.AssertSyncObject<SynchronizedRooms>(SyncObjId, value =>
                            {
                                var mapping = Assert.Single(value.Participants);
                                Assert.Equal(connection.User.Sub, mapping.Key);
                                Assert.Equal(createdRoom.RoomId, mapping.Value);
                src/Services/ConferenceManagement/Strive.IntegrationTests/Services/RoomTests.cs on lines 141..146

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

                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

                        protected override async ValueTask<SynchronizedParticipantPermissions> InternalFetchValue(string conferenceId,
                            SynchronizedObjectId synchronizedObjectId)
                        {
                            var participantId = synchronizedObjectId.Parameters[SynchronizedParticipantPermissions.PROP_PARTICIPANT_ID];
                            var joinedParticipant = new Participant(conferenceId, participantId);
                src/Services/ConferenceManagement/Strive.Core/Services/Equipment/SynchronizedEquipmentProvider.cs on lines 25..33

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

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

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

                        public static void SetConferenceExists(Mock<IMediator> mediator, Conference conference)
                        {
                            mediator.Setup(x => x.Send(It.Is<FindConferenceByIdRequest>(x => x.ConferenceId == conference.ConferenceId),
                                It.IsAny<CancellationToken>())).ReturnsAsync(conference);
                        }
                src/Services/ConferenceManagement/Strive.Core.Tests/_TestHelpers/SynchronizedObjectMediatorExtensions.cs on lines 23..28

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

                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 HashDeleteAsync_KeyExistsButFieldDoesNotExist_ReturnFalse()
                        {
                            const string key = "test";
                            const string field = "field";
                src/Services/ConferenceManagement/Strive.Infrastructure.Tests/KeyValue/InMemory/InMemoryKeyValueDatabaseTests.cs on lines 205..218

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

                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