BabylonJS/Spector.js

View on GitHub

Showing 266 of 572 total issues

Avoid too many return statements within this function.
Open

            return false;
Severity: Major
Found in src/backend/states/context/drawState.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return value;
    Severity: Major
    Found in src/backend/states/parameterState.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return value;
      Severity: Major
      Found in src/backend/commands/baseCommand.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return tag;
        Severity: Major
        Found in src/backend/webGlObjects/baseWebGlObject.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return true;
          Severity: Major
          Found in src/backend/states/baseState.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                        return "[..(" + value.byteLength + ")..]";
            Severity: Major
            Found in src/backend/commands/baseCommand.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                          return gl.getParameter(WebGlConstants.PIXEL_UNPACK_BUFFER_BINDING.value);
              Severity: Major
              Found in src/backend/recorders/bufferRecorder.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                                return false;
                Severity: Major
                Found in src/backend/states/baseState.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return "[..(" + value.length + ")..]";
                  Severity: Major
                  Found in src/backend/commands/baseCommand.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return value;
                    Severity: Major
                    Found in src/backend/commands/baseCommand.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return a === b;
                      Severity: Major
                      Found in src/backend/states/baseState.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return true;
                        Severity: Major
                        Found in src/backend/states/context/stencilState.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return newValue;
                          Severity: Major
                          Found in src/backend/states/parameterState.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                        return value.src;
                            Severity: Major
                            Found in src/backend/commands/baseCommand.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      return undefined;
                              Severity: Major
                              Found in src/backend/recorders/bufferRecorder.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return undefined;
                                Severity: Major
                                Found in src/backend/states/drawCalls/drawCallState.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                              return gl.getParameter(WebGlConstants.PIXEL_PACK_BUFFER_BINDING.value);
                                  Severity: Major
                                  Found in src/backend/recorders/bufferRecorder.ts - About 30 mins to fix

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

                                        public render(state: IResultViewMenuState, stateId: number): Element {
                                    
                                            const htmlString = this.htmlTemplate`<ul class="resultViewMenuComponent">
                                                    <li class="resultViewMenuOpen resultViewMenuSmall"><a href="#" role="button">Menu</a></li>
                                    
                                    
                                    Severity: Minor
                                    Found in src/embeddedFrontend/resultView/menu/resultViewMenuComponent.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 scrollIntoView has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public static scrollIntoView(element: HTMLElement): void {
                                            const elementRect = element.getBoundingClientRect();
                                    
                                            let parentElement = element.parentElement;
                                            while (parentElement) {
                                    Severity: Minor
                                    Found in src/embeddedFrontend/ux/scrollIntoViewHelper.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 showError has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                        public showError(errorMessage: string) {
                                            if (!this.editor) {
                                                return;
                                            }
                                    
                                    
                                    Severity: Minor
                                    Found in src/embeddedFrontend/resultView/sourceCode/sourceCodeComponent.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