Anapher/Strive

View on GitHub

Showing 250 of 735 total issues

Avoid too many return statements within this function.
Open

   return (
      <WebRtcContext.Provider value={webRtc}>
         <Equipment />
      </WebRtcContext.Provider>
   );
Severity: Major
Found in src/Web/WebSPA/Client/src/routes/EquipmentRoute.tsx - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

       return true;
    Severity: Major
    Found in src/Web/WebSPA/Client/src/utils/array-utils.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return t(`${webRtcNamespace}.transport_${health.connection.sendTransport.transportState}.message`, {
               transport: 'send-transport',
            });

        Avoid too many return statements within this function.
        Open

              if (source === 'loopback-screen' && kind === 'video') return true;
        Severity: Major
        Found in src/Services/SFU/src/lib/conference/conference.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return { lastActivity: lastActivity };
          Severity: Major
          Found in src/Web/WebSPA/Client/src/features/scenes/sagas.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

               return { valid: true };

              Avoid too many return statements within this method.
              Open

                                      return Redirect(model.ReturnUrl);

                Avoid too many return statements within this method.
                Open

                                if (year > end) return null;

                  Avoid too many return statements within this method.
                  Open

                                          return Redirect("~/");

                    Avoid too many return statements within this method.
                    Open

                                            return Redirect(model.ReturnUrl);

                      Avoid too many return statements within this method.
                      Open

                                      return year;

                        Avoid too many return statements within this method.
                        Open

                                    if (specificYears.Contains(year)) return year;

                          Avoid too many return statements within this method.
                          Open

                                      return CronExpression.Parse(cronExp).GetNextOccurrence(now, timeZone);

                            Avoid too many return statements within this method.
                            Open

                                        return nextYear;

                              Avoid too many return statements within this method.
                              Open

                                          return View(vm);

                                Avoid too many return statements within this method.
                                Open

                                                if (start > year) return start;

                                  Function createParticipantInfo has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                     private createParticipantInfo(participant: Participant): ParticipantStreams {
                                        const streams: ParticipantStreams = {
                                           consumers: {},
                                           producers: {},
                                        };
                                  Severity: Minor
                                  Found in src/Services/SFU/src/lib/conference/stream-info-repo.ts - About 25 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function mapFormToDto has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  const mapFormToDto: (form: CreatePollDto, myRoomId: string | undefined) => CreatePollDto = (form, myRoomId) => {
                                     const result = {
                                        ...form,
                                        instruction: Object.fromEntries(
                                           Object.entries(form.instruction).filter(

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function removeReceiveTransport has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                     public async removeReceiveTransport(connectionId: string): Promise<void> {
                                        const receiver = this.receivers.get(connectionId);
                                        if (receiver) {
                                           this.receivers.delete(connectionId);
                                  
                                  
                                  Severity: Minor
                                  Found in src/Services/SFU/src/lib/media-soup/mediasoup-mixer.ts - About 25 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Function getPollDescription has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  const getPollDescription = (instruction: NumericInstruction, t: TFunction<string>) => {
                                     const modifiers = new Array<string>();
                                  
                                     if (typeof instruction.min === 'number' && typeof instruction.max === 'number') {
                                        modifiers.push(
                                  Severity: Minor
                                  Found in src/Web/WebSPA/Client/src/features/poll/types/numeric/index.ts - About 25 mins to fix

                                  Cognitive Complexity

                                  Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                  A method's cognitive complexity is based on a few simple rules:

                                  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                  • Code is considered more complex for each "break in the linear flow of the code"
                                  • Code is considered more complex when "flow breaking structures are nested"

                                  Further reading

                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language