Showing 779 of 1,157 total issues

Avoid too many return statements within this function.
Open

    if (oldProps.tileStartRow !== newProps.tileStartRow) return true;
Severity: Major
Found in src/text-editor-component.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

          return true;
    Severity: Major
    Found in src/text-editor-component.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              if (oldHighlight.className !== newHighlight.className) return true;
      Severity: Major
      Found in src/text-editor-component.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            if (desiredIndentLevel < 0) return 0;
        Severity: Major
        Found in src/text-mate-language-mode.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                return true;
          Severity: Major
          Found in src/text-editor-component.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return true;
            Severity: Major
            Found in src/text-editor-component.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return false;
              Severity: Major
              Found in src/text-editor-component.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return fs.listSync(stylesheetDirPath, ['css', 'less']);
                Severity: Major
                Found in src/package.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return desiredIndentLevel;
                  Severity: Major
                  Found in src/text-mate-language-mode.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          return this.openPath({
                            pathToOpen: null,
                            pidToKillWhenClosed,
                            newWindow,
                            devMode,
                    Severity: Major
                    Found in src/main-process/atom-application.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return undefined;
                      Severity: Major
                      Found in src/project.js - About 30 mins to fix

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

                          _moveDown() {
                            let result = false;
                            const { startIndex } = this.treeCursor;
                        
                            // Once the iterator has found a scope boundary, it needs to stay at the same
                        Severity: Minor
                        Found in src/tree-sitter-language-mode.js - 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 matcherForSpec has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function matcherForSpec(spec) {
                          if (typeof spec === 'string') {
                            if (spec[0] === '"' && spec[spec.length - 1] === '"') {
                              return {
                                type: spec.substr(1, spec.length - 2),
                        Severity: Minor
                        Found in src/tree-sitter-grammar.js - 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 upgradeDeprecatedSelectorsForStyleSheet has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                          upgradeDeprecatedSelectorsForStyleSheet(styleSheet, context) {
                            if (this.cacheDirPath != null) {
                              const hash = crypto.createHash('sha1');
                              if (context != null) {
                                hash.update(context);
                        Severity: Minor
                        Found in src/style-manager.js - 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 merge has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        function merge(menu, item, itemSpecificity = Infinity) {
                          item = cloneMenuItem(item);
                          ItemSpecificities.set(item, itemSpecificity);
                          const matchingItemIndex = findMatchingItemIndex(menu, item);
                        
                        
                        Severity: Minor
                        Found in src/menu-helpers.js - 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 restoreSnapshot has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                          restoreSnapshot(styleElementsToRestore) {
                            for (let styleElement of this.getStyleElements()) {
                              if (!styleElementsToRestore.includes(styleElement)) {
                                this.removeStyleElement(styleElement);
                              }
                        Severity: Minor
                        Found in src/style-manager.js - 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 getCalculatedOffset has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        Tooltip.prototype.getCalculatedOffset = function(
                          placement,
                          pos,
                          actualWidth,
                          actualHeight
                        Severity: Minor
                        Found in src/tooltip.js - 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 assignLanguageMode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                          assignLanguageMode(buffer, languageId) {
                            if (buffer.getBuffer) buffer = buffer.getBuffer();
                        
                            let grammar = null;
                            if (languageId != null) {
                        Severity: Minor
                        Found in src/grammar-registry.js - 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 validateEnum has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                            validateEnum(keyPath, value, schema) {
                              let possibleValues = schema.enum;
                        
                              if (Array.isArray(possibleValues)) {
                                possibleValues = possibleValues.map(value => {
                        Severity: Minor
                        Found in src/config.js - 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 getDelegateOptions has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                        Open

                        Tooltip.prototype.getDelegateOptions = function() {
                          const options = {};
                          const defaults = this.getDefaults();
                        
                          if (this._options) {
                        Severity: Minor
                        Found in src/tooltip.js - 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