Showing 779 of 1,157 total issues

WorkspaceElement has 35 functions (exceeds 20 allowed). Consider refactoring.
Open

class WorkspaceElement extends HTMLElement {
  connectedCallback() {
    this.focus();
    this.htmlElement = document.querySelector('html');
    this.htmlElement.addEventListener('mouseleave', this.handleCenterLeave);
Severity: Minor
Found in src/workspace-element.js - About 4 hrs to fix

    exports has 35 functions (exceeds 20 allowed). Consider refactoring.
    Open

    module.exports = class WorkspaceCenter {
      constructor(params) {
        params.location = 'center';
        this.paneContainer = new PaneContainer(params);
        this.didActivate = params.didActivate;
    Severity: Minor
    Found in src/workspace-center.js - About 4 hrs to fix

      Function constructor has 111 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        constructor(atomApplication, fileRecoveryService, settings = {}) {
          StartupTime.addMarker('main-process:atom-window:start');
      
          super();
      
      
      Severity: Major
      Found in src/main-process/atom-window.js - About 4 hrs to fix

        Function createView has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
        Open

          createView(object) {
            if (object instanceof HTMLElement) {
              return object;
            }
        
        
        Severity: Minor
        Found in src/view-registry.js - About 4 hrs 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 openLocations has 109 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          async openLocations(locations) {
            const needsProjectPaths =
              this.project && this.project.getPaths().length === 0;
            const foldersToAddToProject = new Set();
            const fileLocationsToOpen = [];
        Severity: Major
        Found in src/atom-environment.js - About 4 hrs to fix

          Function render has 108 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            render() {
              return (
                <div className="welcome">
                  <div className="welcome-container">
                    <div className="header">
          Severity: Major
          Found in packages/welcome/lib/consent-view.js - About 4 hrs to fix

            Function scan has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

              scan(regex, options = {}, iterator) {
                if (_.isFunction(options)) {
                  iterator = options;
                  options = {};
                }
            Severity: Minor
            Found in src/workspace.js - About 4 hrs 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 measureHorizontalPositionsOnLine has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring.
            Open

              measureHorizontalPositionsOnLine(
                lineNode,
                textNodes,
                columnsToMeasure,
                positions
            Severity: Minor
            Found in src/text-editor-component.js - About 4 hrs 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 scan has 105 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              scan(regex, options = {}, iterator) {
                if (_.isFunction(options)) {
                  iterator = options;
                  options = {};
                }
            Severity: Major
            Found in src/workspace.js - About 4 hrs to fix

              Function update has 103 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                update(params) {
                  const displayLayerParams = {};
              
                  for (let param of Object.keys(params)) {
                    const value = params[param];
              Severity: Major
              Found in src/text-editor.js - About 4 hrs to fix

                Function moveToSuccessor has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                Open

                  moveToSuccessor() {
                    this.openScopeIds = [];
                    this.closeScopeIds = [];
                    while (true) {
                      if (this.tagIndex === this.currentLineTags.length) {
                Severity: Minor
                Found in src/text-mate-language-mode.js - About 4 hrs 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

                DeprecationCopView has 32 functions (exceeds 20 allowed). Consider refactoring.
                Open

                export default class DeprecationCopView {
                  constructor({ uri }) {
                    this.uri = uri;
                    this.subscriptions = new CompositeDisposable();
                    this.subscriptions.add(
                Severity: Minor
                Found in packages/deprecation-cop/lib/deprecation-cop-view.js - About 4 hrs to fix

                  Function initialize has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    initialize(model, { config, project, styleManager, viewRegistry }) {
                      this.handleCenterEnter = this.handleCenterEnter.bind(this);
                      this.handleCenterLeave = this.handleCenterLeave.bind(this);
                      this.handleEdgesMouseMove = _.throttle(
                        this.handleEdgesMouseMove.bind(this),
                  Severity: Major
                  Found in src/workspace-element.js - About 3 hrs to fix

                    Function exports has 99 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    module.exports = async function() {
                      const getWindowLoadSettings = require('./get-window-load-settings');
                      const {
                        test,
                        headless,
                    Severity: Major
                    Found in src/initialize-benchmark-window.js - About 3 hrs to fix

                      Function install has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      exports.install = function(resourcesPath, nodeRequire) {
                        const snapshotSourceMapConsumer = {
                          originalPositionFor({ line, column }) {
                            const { relativePath, row } = snapshotResult.translateSnapshotRow(line);
                            return {
                      Severity: Major
                      Found in src/compile-cache.js - About 3 hrs to fix

                        Function render has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          render() {
                            return (
                              <div className="welcome">
                                <div className="welcome-container">
                                  <header className="welcome-header">
                        Severity: Major
                        Found in packages/welcome/lib/sunsetting-view.js - About 3 hrs to fix

                          Function doStart has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            async doStart() {
                              const getRealPath = givenPath => {
                                if (!givenPath) {
                                  return Promise.resolve(null);
                                }
                          Severity: Major
                          Found in src/path-watcher.js - About 3 hrs to fix

                            File application-delegate.js has 320 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            const { ipcRenderer, remote, shell } = require('electron');
                            const ipcHelpers = require('./ipc-helpers');
                            const { Emitter, Disposable } = require('event-kit');
                            const getWindowLoadSettings = require('./get-window-load-settings');
                            
                            
                            Severity: Minor
                            Found in src/application-delegate.js - About 3 hrs to fix

                              PaneAxis has 30 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class PaneAxis extends Model {
                                static deserialize(state, { deserializers, views }) {
                                  state.children = state.children.map(childState =>
                                    deserializers.deserialize(childState)
                                  );
                              Severity: Minor
                              Found in src/pane-axis.js - About 3 hrs to fix

                                Consider simplifying this complex logical expression.
                                Open

                                    if (node == null || node.parent == null) {
                                      return 0;
                                    } else {
                                      let increment = 0;
                                
                                
                                Severity: Critical
                                Found in src/tree-indenter.js - About 3 hrs to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language