agileseason/agileseason

View on GitHub

Showing 15 of 63 total issues

File api.js has 794 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { GraphQLClient } from 'graphql-request';

const DOMAIN_API = {
  development: 'http://localhost:3000',
  production: 'https://api.agileseason.com'
Severity: Major
Found in src/api.js - About 1 day to fix

    `` has 41 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export default {
      // ---------------------------------
      // User
      // ---------------------------------
    
    
    Severity: Minor
    Found in src/api.js - About 5 hrs to fix

      File board.js has 356 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import api from '@/api';
      
      export default {
        namespaced: true,
      
      
      Severity: Minor
      Found in src/store/modules/board.js - About 4 hrs to fix

        Function moveIssue has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            async moveIssue(
              { commit, getters, state, dispatch },
              { fromColumnIndex, toColumnIndex, fromIssueIndex, toIssueIndex, isColumnTop }
            ) {
              if (fromColumnIndex === undefined) { return; }
        Severity: Minor
        Found in src/store/modules/board.js - About 2 hrs to fix

          Function createIssue has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            async createIssue(token, { boardId, columnId, repositoryId, title, body, position, assignees, labels, color }) {
              const query = `
                mutation(
                  $boardId:Int!,
                  $columnId:Int!,
          Severity: Minor
          Found in src/api.js - About 1 hr to fix

            Function listitem has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            renderer.listitem = (text, task, checked) => {
              if (task) {
                text = text.replace('<p>', '').replace('</p>', '').trim();
                const isInternalCheckboxes = text.includes('<ul>');
                const innerText = extractInnerTaskText(text, isInternalCheckboxes);
            Severity: Minor
            Found in src/utils/markdown.js - About 1 hr to fix

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

                  removeIssue({ state, getters }, { issueId, columnToId }) {
                    console.log('removeIssue');
                    console.log('issueId: ' + issueId);
                    console.log('columnToId: ' + columnToId);
              
              
              Severity: Minor
              Found in src/store/modules/board.js - About 1 hr to fix

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

                  async fetchBoardSettings(token, { id }) {
                    const query = `
                      query($id:Int!) {
                        boardSettings:board(id: $id) {
                          id
                Severity: Minor
                Found in src/api.js - About 1 hr to fix

                  Function updateBoard has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    async updateBoard(token, { id, name, isShared, isIssueProgressVisible, autoarchiveDaysLimit }) {
                      const query = `
                        mutation(
                          $id:Int!,
                          $name:String,
                  Severity: Minor
                  Found in src/api.js - About 1 hr to fix

                    Function moveIssue has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                    Open

                        async moveIssue(
                          { commit, getters, state, dispatch },
                          { fromColumnIndex, toColumnIndex, fromIssueIndex, toIssueIndex, isColumnTop }
                        ) {
                          if (fromColumnIndex === undefined) { return; }
                    Severity: Minor
                    Found in src/store/modules/board.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 createNote has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      async createNote(token, { boardId, body, isPrivate }) {
                        const query = `
                          mutation(
                            $boardId:Int!,
                            $body:String!,
                    Severity: Minor
                    Found in src/api.js - About 1 hr to fix

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

                        render(text, repositoryFullName, clickHandler) {
                          if (clickHandler) {
                            // console.log('render markdown');
                            // console.log('---------------');
                            // console.log(text);
                      Severity: Minor
                      Found in src/utils/markdown.js - About 1 hr to fix

                        Function listitem has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                        renderer.listitem = (text, task, checked) => {
                          if (task) {
                            text = text.replace('<p>', '').replace('</p>', '').trim();
                            const isInternalCheckboxes = text.includes('<ul>');
                            const innerText = extractInnerTaskText(text, isInternalCheckboxes);
                        Severity: Minor
                        Found in src/utils/markdown.js - About 45 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 render has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                        Open

                          render(text, repositoryFullName, clickHandler) {
                            if (clickHandler) {
                              // console.log('render markdown');
                              // console.log('---------------');
                              // console.log(text);
                        Severity: Minor
                        Found in src/utils/markdown.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

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

                            async fetch({ getters }, installationId) {
                              let page = 1;
                              let totalItems = [];
                              while (page <= 10) {
                                let data = await api.fetchRepositories(getters.token, installationId, page);
                        Severity: Minor
                        Found in src/store/modules/repositories.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