jccguimaraes/project-viewer-plus

View on GitHub

Showing 11 of 40 total issues

File icons.js has 742 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable max-lines */
// v2.1.35 (total: 740)
export default [
  'acre',
  'alacritty-alt',
Severity: Major
Found in lib/constants/icons.js - About 1 day to fix

    Function addCommands has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      addCommands () {
        this.subscriptions.add(
          atom.commands.add('atom-workspace', {
            'project-viewer-plus:clear-current-state': () => {
              state.clearState();
    Severity: Major
    Found in lib/project-viewer-plus.js - About 2 hrs to fix

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

        render () {
          const blocks = [];
          const entry = this.newEntry || this.entry;
      
          if (!entry) {
      Severity: Major
      Found in lib/containers/editor.js - About 2 hrs to fix

        PVP has 21 functions (exceeds 20 allowed). Consider refactoring.
        Open

        export default class PVP {
          /**
           * Returns this package configuration object specific to Atom
           * @returns {Object} the package configuration
           */
        Severity: Minor
        Found in lib/project-viewer-plus.js - About 2 hrs to fix

          Function addCommands has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
          Open

            addCommands () {
              this.subscriptions.add(
                atom.commands.add('atom-workspace', {
                  'project-viewer-plus:clear-current-state': () => {
                    state.clearState();
          Severity: Minor
          Found in lib/project-viewer-plus.js - 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 render has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            render () {
              const allowDelete = this.actions.includes('delete')
                ? 'btn btn-error inline-block-tight'
                : 'btn hide';
          
          
          Severity: Minor
          Found in lib/components/editor/options.js - About 1 hr to fix

            Function addContextMenu has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              addContextMenu () {
                this.subscriptions.add(
                  atom.contextMenu.add({
                    '.project-viewer-plus': [
                      {
            Severity: Minor
            Found in lib/containers/main.js - About 1 hr to fix

              Function serializeGroupById has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                serializeGroupById (id, withContext = true) {
                  const level = { groups: [], projects: [] };
              
                  const group = this.getEntry(id || NaN);
              
              
              Severity: Minor
              Found in lib/services/state.js - About 1 hr to fix

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

                  async readState (currentState) {
                    let content;
                
                    try {
                      return state.initializeState(currentState, true);
                Severity: Minor
                Found in lib/project-viewer-plus.js - About 1 hr to fix

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

                    render () {
                      return (
                        <div className="block-container">
                          {this.children.map(child => child)}
                          <label class="input-label">
                  Severity: Minor
                  Found in lib/components/editor/type.js - About 1 hr to fix

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

                      render () {
                        const blocks = [];
                        const entry = this.newEntry || this.entry;
                    
                        if (!entry) {
                    Severity: Minor
                    Found in lib/containers/editor.js - About 35 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