Anapher/Strive

View on GitHub

Showing 250 of 735 total issues

Function unregisterConsumer has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

   private unregisterConsumer(id: string): void {
      log('Unregister consumer %s', id);

      let currentUsage = this.consumerUsage.get(id);
      if (currentUsage === undefined) {
Severity: Minor
Found in src/Web/WebSPA/Client/src/store/webrtc/consumer-usage-control.ts - About 1 hr to fix

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

            public async Task<Unit> Handle(UpdateParticipantsPermissionsRequest request,
                CancellationToken cancellationToken)
            {
                var participants = request.Participants;
    
    

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

              public async Task<Unit> Handle(UndoRequest request, CancellationToken cancellationToken)
              {
                  var (conferenceId, roomId, whiteboardId, participantId) = request;
      
                  Whiteboard UpdateAction(Whiteboard whiteboard)

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

                public async Task<Unit> Handle(RedoRequest request, CancellationToken cancellationToken)
                {
                    var (conferenceId, roomId, whiteboardId, participantId) = request;
        
                    Whiteboard UpdateAction(Whiteboard whiteboard)

          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;
                          
                          

                            Function coreHub.fetchChatMessages.returnAction has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                                  [coreHub.fetchChatMessages.returnAction]: (
                                     state,
                                     {
                                        payload,
                                        meta,
                            Severity: Minor
                            Found in src/Web/WebSPA/Client/src/features/chat/reducer.ts - About 1 hr 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 TagCloudAnswerForm has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                            export default function TagCloudAnswerForm({
                               poll: { poll, answer },
                               footerPortalRef,
                               onSubmit,
                               onDelete,

                            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 SceneView has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                            export default function SceneView() {
                               const classes = useStyles();
                               const [contentRef, dimensions] = useThrottledResizeObserver(100);
                            
                               const sceneStack = useSelector(selectSceneStack);
                            Severity: Minor
                            Found in src/Web/WebSPA/Client/src/features/scenes/components/SceneView.tsx - About 1 hr 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 removeProducer has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                               public removeProducer(producerId: string): void {
                                  const producer = this.producers.get(producerId);
                                  if (producer) {
                                     this.producers.delete(producerId);
                            
                            
                            Severity: Minor
                            Found in src/Services/SFU/src/lib/media-soup/mediasoup-mixer.ts - About 1 hr 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 SendMessageForm has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                            Open

                            export default function SendMessageForm({ onSendMessage, isTyping, channel }: Props) {
                               const dispatch = useDispatch();
                               const { t } = useTranslation();
                            
                               const [message, setMessage] = useState('');

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

                               createSelector(selectLocalDevices, selectEquipmentConnections, getSource, (devices, equipment, source) => {
                                  const result = new Array<DeviceGroup>();
                            
                                  if (devices) {
                                     const localDevices = devices
                            Severity: Minor
                            Found in src/Web/WebSPA/Client/src/features/settings/selectors.tsx - About 1 hr to fix

                              Function registerConferenceEvents has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                 private async registerConferenceEvents(id: string, conference: Conference): Promise<void> {
                                    await this.repository.addMessageHandler(id, async (message) => {
                                       switch (message.type) {
                                          case 'conferenceInfoUpdated':
                                             const unfreezeCallback = conference.streamInfoRepo.freeze();
                              Severity: Minor
                              Found in src/Services/SFU/src/lib/conference/conference-manager.ts - About 1 hr to fix
                                Severity
                                Category
                                Status
                                Source
                                Language