Showing 1,157 of 1,157 total issues

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

  render() {
    return (
      <div className="welcome is-guide">
        <div className="welcome-container">
          <section className="welcome-panel">
Severity: Major
Found in packages/welcome/lib/guide-view.js - About 1 day to fix

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                  <svg
                    className="welcome-logo"
                    width="330px"
                    height="68px"
                    viewBox="0 0 330 68"
    Severity: Major
    Found in packages/welcome/lib/sunsetting-view.js and 2 other locations - About 1 day to fix
    packages/welcome/lib/consent-view.js on lines 17..66
    packages/welcome/lib/welcome-view.js on lines 40..89

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 278.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                  <svg
                    className="welcome-logo"
                    width="330px"
                    height="68px"
                    viewBox="0 0 330 68"
    Severity: Major
    Found in packages/welcome/lib/welcome-view.js and 2 other locations - About 1 day to fix
    packages/welcome/lib/consent-view.js on lines 17..66
    packages/welcome/lib/sunsetting-view.js on lines 40..89

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 278.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                  <svg
                    class="welcome-logo"
                    width="330px"
                    height="68px"
                    viewBox="0 0 330 68"
    Severity: Major
    Found in packages/welcome/lib/consent-view.js and 2 other locations - About 1 day to fix
    packages/welcome/lib/sunsetting-view.js on lines 40..89
    packages/welcome/lib/welcome-view.js on lines 40..89

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 278.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function open has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
    Open

      async open(itemOrURI, options = {}) {
        let uri, item;
        if (typeof itemOrURI === 'string') {
          uri = this.project.resolvePath(itemOrURI);
        } else if (itemOrURI) {
    Severity: Minor
    Found in src/workspace.js - About 1 day 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

    File config-schema.js has 658 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    // This is loaded by atom-environment.coffee. See
    // https://atom.io/docs/api/latest/Config for more information about config
    // schemas.
    const configSchema = {
      core: {
    Severity: Major
    Found in src/config-schema.js - About 1 day to fix

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

      module.exports = class Package {
        /*
        Section: Construction
        */
      
      
      Severity: Major
      Found in src/package.js - About 1 day to fix

        Function populateTextDecorationsToRender has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
        Open

          populateTextDecorationsToRender() {
            // Sort all boundaries in ascending order of position
            this.textDecorationBoundaries.sort((a, b) =>
              a.position.compare(b.position)
            );
        Severity: Minor
        Found in src/text-editor-component.js - About 1 day 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

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

        module.exports = class ApplicationDelegate {
          constructor() {
            this.pendingSettingsUpdateCount = 0;
            this._ipcMessageEmitter = null;
          }
        Severity: Major
        Found in src/application-delegate.js - About 1 day to fix

          Function toggleLineCommentsForBufferRows has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
          Open

            toggleLineCommentsForBufferRows(start, end, options = {}) {
              const languageMode = this.buffer.getLanguageMode();
              let { commentStartString, commentEndString } =
                (languageMode.commentStringsForPosition &&
                  languageMode.commentStringsForPosition(new Point(start, 0))) ||
          Severity: Minor
          Found in src/text-editor.js - About 1 day 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

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

          module.exports = class PackageManager {
            constructor(params) {
              ({
                config: this.config,
                styleManager: this.styleManager,
          Severity: Major
          Found in src/package-manager.js - About 1 day to fix

            File dock.js has 579 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            const etch = require('etch');
            const _ = require('underscore-plus');
            const { CompositeDisposable, Emitter } = require('event-kit');
            const PaneContainer = require('./pane-container');
            const TextEditor = require('./text-editor');
            Severity: Major
            Found in src/dock.js - About 1 day to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                          <details
                            className="welcome-card"
                            {...this.getSectionProps('styling')}
                          >
                            <summary className="welcome-summary icon icon-paintcan">
              Severity: Major
              Found in packages/welcome/lib/guide-view.js and 1 other location - About 1 day to fix
              packages/welcome/lib/guide-view.js on lines 243..277

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 228.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

                          <details
                            className="welcome-card"
                            {...this.getSectionProps('init-script')}
                          >
                            <summary className="welcome-summary icon icon-code">
              Severity: Major
              Found in packages/welcome/lib/guide-view.js and 1 other location - About 1 day to fix
              packages/welcome/lib/guide-view.js on lines 209..241

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 228.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              File tooltip.js has 564 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              'use strict';
              
              const EventKit = require('event-kit');
              const tooltipComponentsByElement = new WeakMap();
              const listen = require('./delegated-listener');
              Severity: Major
              Found in src/tooltip.js - About 1 day to fix

                File project.js has 561 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                const path = require('path');
                
                const _ = require('underscore-plus');
                const fs = require('fs-plus');
                const { Emitter, Disposable, CompositeDisposable } = require('event-kit');
                Severity: Major
                Found in src/project.js - About 1 day to fix

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

                  module.exports = class Cursor extends Model {
                    // Instantiated by a {TextEditor}
                    constructor(params) {
                      super(params);
                      this.editor = params.editor;
                  Severity: Major
                  Found in src/cursor.js - About 1 day to fix

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                        this.panelContainers = {
                          top: new PanelContainer({
                            viewRegistry: this.viewRegistry,
                            location: 'top'
                          }),
                    Severity: Major
                    Found in src/workspace.js and 1 other location - About 1 day to fix
                    src/workspace.js on lines 332..364

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 219.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                        this.panelContainers = {
                          top: new PanelContainer({
                            viewRegistry: this.viewRegistry,
                            location: 'top'
                          }),
                    Severity: Major
                    Found in src/workspace.js and 1 other location - About 1 day to fix
                    src/workspace.js on lines 224..256

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 219.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    File deprecation-cop-view.js has 527 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /** @babel */
                    /** @jsx etch.dom */
                    
                    import _ from 'underscore-plus';
                    import { CompositeDisposable } from 'atom';
                    Severity: Major
                    Found in packages/deprecation-cop/lib/deprecation-cop-view.js - About 1 day to fix
                      Severity
                      Category
                      Status
                      Source
                      Language