cerniglj1/osrs-quest-tool

View on GitHub

Showing 82 of 336 total issues

File questData.js has 5627 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export default {
  "A Soul's Bane": {
    miniquest: false,
    name: "A Soul's Bane",
    shortName: 'aSoulsBane',
Severity: Major
Found in lib/resources/quest/questData.js - About 2 wks to fix

    File questData.js has 5489 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    module.exports = exports = {
        "A Soul's Bane": {
            "miniquest": false,
            "name": "A Soul's Bane",
            "shortName": "aSoulsBane",
    Severity: Major
    Found in src/resources/questData.js - About 2 wks to fix

      File questDataArray.js has 5488 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      module.exports = exports = [{
              "miniquest": false,
              "name": "A Soul's Bane",
              "shortName": "aSoulsBane",
              "url": "https://oldschool.runescape.wiki/w/A_Soul%27s_Bane",
      Severity: Major
      Found in lib/resources/quest/questDataArray.js - About 2 wks to fix

        File questDataArray.js has 5488 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        module.exports = exports = [{
                "miniquest": false,
                "name": "A Soul's Bane",
                "shortName": "aSoulsBane",
                "url": "https://oldschool.runescape.wiki/w/A_Soul%27s_Bane",
        Severity: Major
        Found in src/resources/questDataArray.js - About 2 wks to fix

          File slayerData.js has 4454 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          var slayerData = [
            {
              Turael: {
                name: 'Turael',
                assignments: [
          Severity: Major
          Found in lib/resources/slayer/slayerData.js - About 1 wk to fix

            File slayerData.js has 4454 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var slayerData = [
              {
                Turael: {
                  name: 'Turael',
                  assignments: [
            Severity: Major
            Found in src/resources/slayer/slayerData.js - About 1 wk to fix

              Function updateQuestDataByRow has a Cognitive Complexity of 90 (exceeds 5 allowed). Consider refactoring.
              Open

              def updateQuestDataByRow(quest_data, row):
                  sections = row.find_all("th", {"class": "questdetails-header"})
                  details = row.find_all("td", {"class": "questdetails-info"})
                  quest_details = None
                  section_name = None
              Severity: Minor
              Found in tools/getQuestData.py - 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

              Function canCompleteQuest has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
              Open

                canCompleteQuest(quest) {
                  if (quest == undefined || quest == null) {
                    return true;
                  }
              
              
              Severity: Minor
              Found in lib/model/quest/QuestTool.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

              Function canCompleteQuest has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
              Open

              function canCompleteQuest(quest, account) {
                if (quest.name === 'Recipe for Disaster') {
                  // TODO
                  // Pirate Pete Subquest of Recipe for Disaster
                  return true;
              Severity: Minor
              Found in lib/osrstools.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

              Function meetQuestRequirements has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
              Open

              function meetQuestRequirements(quest, account) {
                if (quest === 'Recipe for Disaster') {
                  // TODO
                  // Pirate Pete Subquest of Recipe for Disaster
                  return true;
              Severity: Minor
              Found in lib/osrstools.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

              Function meetsRequirement has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
              Open

              function meetsRequirement(quest, account) {
                if (quest === 'Recipe for Disaster') {
                  // TODO
                  // Pirate Pete Subquest of Recipe for Disaster
                  return true;
              Severity: Minor
              Found in lib/osrstools.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

              Function createArrayFromTable has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
              Open

              def createArrayFromTable(table, isminiquest):
                  # for all tables (tr) rows on page
                  rowNum = 0
                  table_body = table.find('tbody')
                  rows = table_body.find_all('tr')
              Severity: Minor
              Found in tools/getQuestData.py - 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

              Function addSorting has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
              Open

              var addSorting = (function() {
                  'use strict';
                  var cols,
                      currentSort = {
                          index: 0,
              Severity: Minor
              Found in coverage/lcov-report/sorter.js - About 6 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 addSorting has 161 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              var addSorting = (function() {
                  'use strict';
                  var cols,
                      currentSort = {
                          index: 0,
              Severity: Major
              Found in coverage/lcov-report/sorter.js - About 6 hrs to fix

                Function canCompleteQuest has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  canCompleteQuest(quest) {
                    if (quest == undefined || quest == null) {
                      return true;
                    }
                
                
                Severity: Major
                Found in lib/model/quest/QuestTool.js - About 3 hrs to fix

                  Function canCompleteQuest has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function canCompleteQuest(quest, account) {
                    if (quest.name === 'Recipe for Disaster') {
                      // TODO
                      // Pirate Pete Subquest of Recipe for Disaster
                      return true;
                  Severity: Major
                  Found in lib/osrstools.js - About 2 hrs to fix

                    Function init has 63 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    var jumpToCode = (function init() {
                        // Classes of code we would like to highlight in the file view
                        var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
                    
                        // Elements to highlight in the file listing view
                    Severity: Major
                    Found in coverage/lcov-report/block-navigation.js - About 2 hrs to fix

                      File osrstools.js has 270 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      // import { QuestTool } from './questTool.js';
                      import { QuestTool } from './classes/Quest/model/QuestTool';
                      import { SlayerTool } from './classes/Slayer/model/SlayerTool';
                      import { OsrsAccount } from '../src/lib/model/runescape/OsrsAccount';
                      
                      
                      Severity: Minor
                      Found in lib/osrstools.js - About 2 hrs to fix

                        File getQuestData.py has 267 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import requests
                        from bs4 import BeautifulSoup
                        import json
                        import urllib2
                        import sys
                        Severity: Minor
                        Found in tools/getQuestData.py - About 2 hrs to fix

                          Function meetQuestRequirements has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function meetQuestRequirements(quest, account) {
                            if (quest === 'Recipe for Disaster') {
                              // TODO
                              // Pirate Pete Subquest of Recipe for Disaster
                              return true;
                          Severity: Major
                          Found in lib/osrstools.js - About 2 hrs to fix
                            Severity
                            Category
                            Status
                            Source
                            Language